migrate database to other instance of NopCommerce

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 年 前
Hi,

I have a specific problem I could not solve until now. I have a NopCommerce 3.6 instance installed on one hoster but I needed to migrate to another hoster without the full site backup.
So:
1) Old site backup with old database
2) new database but not latest version of the site.
I only got the latest version of the database. When I try to link the site to the latest version of the database in the settings.txt file in the app_data folder, all kinds of errors occur.
The first one was that the column id from the [dbo].[Log] table was not nullable. After a long search I deleted all records from the log file and I did a DBCC check ident reseed for the identity on the column id. This worked to open up the site but the next error emerged. the id column from the [dbo].[customer] was not nullable. I think there is somewhere in the front end some kind of track record of the latest entries in the database.
Does this ring a bell to someone?

Please help!
6 年 前
It's not clear to me if you are just trying to copy your 3.60 DB & nopCommerce to another host, or if you also want to upgrade that site on the new host to 3.90.    If the latter, then you should backup the old DB, then restore that  DB to the new host database server, then run the SQL upgrade scripts (3.70, 3.80 & 3.90), and then you can have a 3.90 nopCommerce site point to that DB in the /App_Data/Settings.txt file.
6 年 前
Hi,

I am just trying to link my existing nop 3.6 site to a newer database.
1) So the old hoster had the website and the DB.
2) Website and DB where copied to new hoster
3) In a meanwhile other changes happened to the old live site.
4) Site backup on old hoster was lost, only most recent DB backup was kept.
5) Tried to link the website on new hoster (which was copied a couple of months ago) to the most recent version of the database backup but that did not work.

I hope this is more clear. if not please let me know.

kind regards,
6 年 前
Mani2 wrote:
Hi,

I am just trying to link my existing nop 3.6 site to a newer database.
1) So the old hoster had the website and the DB.
2) Website and DB where copied to new hoster
3) In a meanwhile other changes happened to the old live site.
4) Site backup on old hoster was lost, only most recent DB backup was kept.
5) Tried to link the website on new hoster (which was copied a couple of months ago) to the most recent version of the database backup but that did not work.

I hope this is more clear. if not please let me know.

kind regards,


What exactly you did as per your point#5? Please provide the exact steps.

What seems to be the problem? Is your public site working on new hosting server? If you are seeing any error messages in log, please provide the exact error messages.
6 年 前
Hi,

Thanks for your quick reply.
In Point 5 I copied the recent database and imported it in my SQL server as a new database. I then changed the connection string to the new database and then all the problems started.
I get all database error issues. I cannot access the public site to look at the log file even.
But all errors were linked to the fact that the primary key in the database was different then expected

I will post the errors later ( cannot access the host from here)

Regards,
6 年 前
RE:  "..copied the recent database and imported it in my SQL server..."
Copy? Import?  Normally you Backup and Restore.  Please clarify.
6 年 前
Because backup and restore throws tons of errors like:

1) Cannot truncate database
2) primary key violation
3) table not empty

Actually I know you can overwrite & delete and allow to overwrite primary keys when you restore the DB but that does not work.

So that is why I copied the database.

Regards,
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.