I am currently on version 9 (on Server-9), and i also have a second server (Server-10) which has erpnext V10. All my data is on server-nine. Now i want to migrate from server-9 to server-10.
I read through the below page and found that i need to take a backup on server-9, put that file onto server-10 and run bench restore with this backup file.
Assume the docType Customer had 10 fields in v9 and 15 fields in v10.
My query is that,
- When i do the bench restore from server-9 to server-10, wouldnt the customer table be overwritten with only 10 fields ?
- What should i do so that i have all the changes of version-10 on server-10 (customer table will have 15 fields) but the data should be what i had on server-9.
Please let me know.
Wouldn’t it be easier to create a VM of v9 and upgrade to v10. Then backup from there and restore to final destination server of v10?
I already have a v10. Also there was some issue with bench update some time back. After a fresh install, it shows all the files are updated when i run a git status. So was thinking about this route.
But whichever method i use, i was wondering if someone could answer my queries, so that i know how it works.
your custom fields are stored in the database under “tabCustom Field” and will be migrated with the database from 9 to 10. Therefore, all customizations (should ) migrate. Please give it a try and revert in case of issues.
Update your V9 server to the latest V10 production and resolve all the errors, then make a backup and restore to your new V10 server. That’s the only way that will work properly.
Thank you for all the responses.
The bench update has an issue, so i was thinking of bench restore. @dominik I will try out once again your suggested way.
@lasalesi , actually i donot have any custom fields. I am more worried about the new fields that came into v10 which were not present in the v9 erpnext core.
But just wondering, if on v10 server, if i run a restore with v9 backup sql, will it override the tables that came in with v10 with the ones from v9, as it is a db replacement ? Will bench migrate fix the issues, by pushing the changes from the git files to the DB? Just trying to understand the mechanism.
Its a bad idea to restore a V9 database into a V10 system because:
- Table names may have changed (Production Order –> Work Order) which are patched during the update but since you won’t have that patched you will not have migrated the data or may be left with a broken system
- There may be performance patches that are run which you would be left out of
Even if it worked in the sense of not throwing errors this would be a really bad idea.
You need to update to V10 and deal with the errors and resolve them.
Thank you for the detailed infor @dominik Appreciate your help.