The admin accounts do not work when copying the server database to localhost. In an effort to copy the server database to the localhost, we use SSMS to create a backup on the server and then restore the database on the localhost using that backup. However, when this is done, no logins work on the localhost even though the website is working.
I cannot login to the backend. I have tried using umbraco-admin-reset, but this is not working at all. Any ideas or other ways to copy the server database to the localhost without running into password/user issues?
I also notice some other items do not carry over when restoring he database like this. Is there a better way / recommended way to copy a database from a server to another machine and not lose any data?
I am using the same web.config file minus the connection strings for the server and other rules to force https instead of http, etc. I do notice that the Membership Provider settings are different for the localhost web.config. What should the Membership Provider look like for 7.10.4? My server web.config has the following, which works on the server:
The Membership Provider on the localhost, which was working with the previous older database (until restoring/copying the server one to localhost) has the following, which does not work with the new database from server:
I was under the impression that useLegacyEncoding should be true, but the server one which works is set to false. I have no idea what this should look like for security, but also how to ensure I get into the backend?
However, Joep, if I am now using the Membership Provider settings in from the server, but I want to use Legacy Encoding (set it to true), how will I login after? It will likely kick me out...I want to ensure the security is updated.
Have you tried creating a BACPAC using SSMS and importing that on the local server. I found this to be the easiest and relative fast way to do the backup and restore local (in a new DB).
Login issues when restoring / copying db from server to localhost
The admin accounts do not work when copying the server database to localhost. In an effort to copy the server database to the localhost, we use SSMS to create a backup on the server and then restore the database on the localhost using that backup. However, when this is done, no logins work on the localhost even though the website is working.
I cannot login to the backend. I have tried using umbraco-admin-reset, but this is not working at all. Any ideas or other ways to copy the server database to the localhost without running into password/user issues?
I also notice some other items do not carry over when restoring he database like this. Is there a better way / recommended way to copy a database from a server to another machine and not lose any data?
Umbraco version = 7.4.10.
Hi,
Are you using the same web.config file on localhost? Otherwise it could be that you have some different settings on the MembershipProvider.
-Joep
I am using the same web.config file minus the connection strings for the server and other rules to force https instead of http, etc. I do notice that the Membership Provider settings are different for the localhost web.config. What should the Membership Provider look like for 7.10.4? My server web.config has the following, which works on the server:
The Membership Provider on the localhost, which was working with the previous older database (until restoring/copying the server one to localhost) has the following, which does not work with the new database from server:
I was under the impression that useLegacyEncoding should be true, but the server one which works is set to false. I have no idea what this should look like for security, but also how to ensure I get into the backend?
Hi,
You should either use the localhosts settings on both or the server settings on both to make sure it uses the same password encoding / hashing.
-Joep
Thanks, so I just tested it out. There are two solutions:
1) To use the exact same Membership Provider settings as the server in the localhost. This gets me into the backend.
2) Or you can @Saba's method from this post https://our.umbraco.com/forum/using-umbraco-and-getting-started/100915-can-not-login-in-umbraco-backoffice-after-deployment-on-production to change the password to a known hash.
However, Joep, if I am now using the Membership Provider settings in from the server, but I want to use Legacy Encoding (set it to true), how will I login after? It will likely kick me out...I want to ensure the security is updated.
Hi,
I think that this post will help you: https://our.umbraco.com/forum/using-umbraco-and-getting-started/88852-changing-uselegacyencoding-from-true-to-false
-Joep
Thank you. Any recommendations re copying server database to localhost? https://our.umbraco.com/forum/using-umbraco-and-getting-started/101275-how-to-properly-copy-database-from-server-to-localhost
Have you tried creating a BACPAC using SSMS and importing that on the local server. I found this to be the easiest and relative fast way to do the backup and restore local (in a new DB).
I was thinking about this. Microsoft says that a restore is the most complete copy of a database, but I will try this instead.
is working on a reply...