I have database from version 10 i try to update from 10-11,11-12,12-13 but no success. So i install a new version 13 server and now trying to backup the data from 10 and restore on to version 13. Any one have any idea can help me. if i know someone can do this i will pay for the help. I try contact ERPNext Support but they never reply to my emails.
Thanks to @Suresh_Thakor i was a able to restore a backup from version 12 into version 13 and working.
What did we do?
Install version 13 not the beta - If you install the beta you will get some doctype error for workspace. If youhave the beta install with the new ui just switch to version 13 with out the beta.
How to switch?
sudo bench switch-to-branch version-13 frappe erpnext --upgrade
sudo bench update --patch
sudo bench setup requirements
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo bench setup requirements
sudo bench migrate
sudo bench build
sudo bench restart
Once you install is complete successfull make sure you create a site and test your site.
Next Restore a backup from your previous site
-
Make sure you are in the frappe-bench folder (cd /home/frappe/frappe-bench if you are on ubuntu)
-
Copy your backup from you old version server to you new version server. You can used WinSCP to copy backup.
-
Make sure you backup file name is not long and include the correct extension *.sql.gz
-
Execute this command bench --site yoursitename --force restore yoursitebackup.sql.gz (remember to add your site name before execute)
Now Let’s Update Bench
-
Execute bench migrate or *
sudo bench --site <my site> migrate
if you want to do 1 by 1
If you encounter any doctype error you must install them from bench consoleby executing this command in the following steps 1 bench --site yoursitename console step 2 frappe.reload_doc(‘desk’, ‘doctype’, ‘workspace’) step 3 frappe.db.commit() step 4 exit -
Execute bench update --patch just incase you restore missing db migration
Rebuild your site and you should be good
- sudo bench build
- sudo bench restart
erpnext@eng-HP-EliteBook-820-G1:~/frappe-bench$ bench --site site1.local --force restore _1bd3e0294da19198.sql
WARN: bench is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: pip install frappe-bench
Table tabDefaultValue
not found in file.
I get this error after restore any solution bro
What i do when i get datbase error may not reocmmended by ERPNext. Install a new site for version 13 just to have access to schema and default data. find that tabDefaultValue in the new install and get the valus that are missing and put them in you restore site. if you are not a db guy dont try edit you database.
how i find tabDefaultValue from new installation please share the steps. thanks for your reply.
Thanks @Jermaine_Gray for the clear instructions. this worked for me… Successfully restored v11 backup to v12 bench . Thanks very much