Migrating hosting

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Doing a trial run and trying to migrate an existing NOP store to a different server. Followed these basic steps:

Copied all files from old server to new server
Created DB backup on old server.
Created new DB (random name) on new server
Restored old DB to new DB.
Changed APPDATA>Settings.txt to new db connection

Am I missing anything?
Here is the temp url assigned in my hosting trial. I'm getting an error.
http://groundzero2010-001-site1.btempurl.com/
8 years ago
Here is basically what I'm doing to migrate.

http://www.smarterasp.net/support/kb/a390/how-to-backup-and-restore-a-nopcommerce-web-application-to-smarterasp_net-account.aspx?KBSearchID=143721
8 years ago
Download a copy of your old SQL database (should be a .bak file). Keep it on your local machine.

Dump whatever SQL db you've already created, then use the 'Add Database' option. Mind the name and password, you'll need them later. Once it's created, Click on it, Then on the Actions Drop Down, click 'Restore'. On that page, use the option to Restore from back up, then use the file box to navigate to your .bak file.

Once the db has been restored, click on the connection string link, and modify App_Settings --> Settings.txt for the correct links to the database. I had only one problem, I'd copied the file name incorrectly, fixed by a cut & paste.

Good Luck!
8 years ago
I looked at that error again, and it looks more like a Config.Web error than an SQL error.
8 years ago
I basically did what you suggested before hand but recreated the database to ensure. I'm coming up with the same error.
8 years ago
What in the web.config file would need to be changed when switching to a new host?

The only thing that is really changing between hosts is:

my domain name isn't the same
no SSL certificate on new host
database name and connection changes (which I've changed to match new)

Am I missing something?
8 years ago
try to check your web.config or your application framework in iis make sure the version is correct and try to switch between classic or integrated
8 years ago
You could try spooling up a fresh Nop installation (if your account allows you to) under a different temp URL (with a fresh db), and once the fresh installation is up and running, simply change the connection string to your previously migrated database and see if it works. The fresh installation should give you a good web.config without having to figure out what may be going wrong with the old one on the new platform. You can copy this web.config from the fresh installation over to your other store site as well, and see if that fixes any issues. Only other thing you may need to do with the web.config is add a machine key.

If you still get a system error, chances are pretty good that the database backup you downloaded from the original site may be corrupt.

Note: When I migrated a number of nop sites off of ArchVixen to in-house hosting, I later found out that NONE of the database backup files that I downloaded were usable. I had already canceled my account, so all hope of getting good back-ups were lost, and I had to basically start all the sites from scratch.  ARGH!

Moral of story:  MAKE SURE YOU GET A GOOD USABLE DATABASE BACKUP BEFORE YOU CANCEL YOUR ACCOUNT!

Ron
8 years ago
Thanks for all the great suggestions. I tried switching from Integrated mode to Classic mode and that didn't seem to help.

I've tried with and without a machine key in the web.config file.

I spooled up a fresh copy of NOP and made a backup of a stock database. Applied this to my site and the database fixed the issue! Thankfully I still have my production site up and running, but how do I receive a good working backup. I've already tried twice before posting originally. Any suggestions on a way to compare database files, etc? I don't have much knowledge of databases other than restore/backup features that are built-in to hosting services.
8 years ago
Glad to see you have made some progress. It appears that I was correct in thinking you most likely have a corrupted database backup.(or perhaps not a full backup)

The machine key is not a big issue, but sometimes you will see random disconnects without having one installed, and Nop will also gripe about it on the warning page.

You need to get a good FULL database backup from your old hosting provider. I had same issue, which never was resolved.  I had multiple backups for each site, and none of them were any good when trying to migrate them to a new server. No way to know why this was an issue, but perhaps their panel access may only provide for incremental back-ups which would only work on their SQL server (SQL sees incrementals as a backup set) and this only rolls back the database to an earlier point in time. (I'm not saying this is the case, but it could be)

Did you try a backup and restore (to a fresh install on separate url) of the database on the original hosting site with success? I could never even get that to work with ArchVixen. Perhaps you will have better luck. Worst case maybe you can put in another trouble ticket and say you need a good FULL backup, and they will jump to the rescue. :-)

No easy suggestions on how to compare SQL databases without knowing what you are doing. Check-sum is most reliable method to compare files (any files) for exactness.

Note: The devil is in the DETAILS regarding good hosting providers. Any hosting provider or hosting plan can look good until the crap hits the fan. For me (and my clients), if the crap hits the fan, I have nobody to blame but myself.  (Well, maybe Time Warner Business Class, if it is a connectivity issue...) LOL!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.