I’ve made a backup of the database and files from the 32bit virtual machine and created a shared folder that is also mounted to the new 64bit virtual machine, which is running the newest ERPNext version. From that shared folder, I am able to see and extract the backup files on the new VM. I have tried multiple times to migrate the database and files over to the new VM, but have not had success. I am following Restoring From ERPNext Backup · frappe/erpnext Wiki · GitHub and have noticed that there is a note: “If restoring from another machine, the sitename has to exist before you can restore the sql and files.” On the new VM, the sites folder contains sites1.local (the old VM has sites/erpnext.vm). Am I supposed to create a new directory to mimic the old VM’s site (erpnext.vm) before running bench restore?
I’ve been at this for a week. Any help is appreciated.
Ok. Is there any way to go specifically from 7 to 8 with “bench update”? Also, should I upgrade on the old 32bit VM and then make backups and migrate them to the new VM? Lastly, I tried using “bench new-site erpnext.vm” to mimic the old VM and I get “Errno 13: Permission denied” (Tried this assuming that the problem was that the sites did not match between the two VMs).
Maybe this procedure would solve your problem. I recommend you to take snapshots at each step just to make sure you can revert to a previous point in time if anything goes wrong though.
Hi I have done several migrations from v7 to v11, so far so good. You can just restore your v7 to v11 and do bench update or bench migrate. But please get a backup of your v7 first before doing anything else (just incase).
This is what I’ve been trying to do. I will try @vrms suggestion, but would like to see the steps involved with your solution. I’m doing all of this in a test environment with backups of the VMs, so no need to worry about corrupting the actual site that is running.
Yes, it does return the errors you mention. But no matter how many times I update, the errors remain and the site returns “Internal Server Error.” Here is more info just for anyone that might have more insight in the matter:
I need to go from a 32bit VM running ERPNext 7 to a 64bit VM running ERPNext 11 because apparently some features of ERPNext 11 (like Yarn) require a 64bit OS. So I’ve created a new VM with the updated ERPNext 11 and have backed up the database from the old VM and copied it over to the new VM. When I run the bench restore and migrate functions, it works but returns some errors (like the errors mentioned above about database table columns missing). This led me to revisit the guide: Restoring From ERPNext Backup · frappe/erpnext Wiki · GitHub which states that the site must already exist if moving from one machine to another. So back to my original question: Do I have to create this site to mimic the old one? Or is migrating the old database into “site1.local” the correct way? Also, are the errors most likely related to going from 32bit to 64bit? Or just from old ERPNext to new ERPNext without installing the consecutive updates? Going to read up on @vrms solution and start going from there in the meantime.
I tried the procedure you mentioned. It works to a certain point and then fails at the bench update as before. I went from v7 to v8, but at the update, fails at installing Yarn. This is what happened when just trying to do the normal bench update from v7 without going specifically to v8. Any help is appreciated.
I took backup of bench, frappe, erpnext and other custom app on git then I took database backup.
I executed bench update --reset command.
At the end it was failed to build js and CSS file. I don’t know why, but then I took all js and CSS file from other v11 server and manually upload all the files. At the last it was working fine.
How does one go about backing up bench, frappe, erpnext, etc.? According to the docs, the only things you have to back up are the database and files in private/files and public/files.
Since yarn fails when doing bench update, I try to install it on its own. This is what I get when doing “sudo npm install yarn” from the old VM (ERPNext v7):
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/nodejs’, ‘/usr/bin/npm’, ‘install’, ‘yarn’ ]
2 info using npm@1.3.10
3 info using node@v0.10.25
4 verbose cache add [ ‘yarn’, null ]
5 verbose cache add name=undefined spec=“yarn” args=[“yarn”,null]
6 verbose parsed url { protocol: null,
6 verbose parsed url slashes: null,
6 verbose parsed url auth: null,
6 verbose parsed url host: null,
6 verbose parsed url port: null,
6 verbose parsed url hostname: null,
6 verbose parsed url hash: null,
6 verbose parsed url search: null,
6 verbose parsed url query: null,
6 verbose parsed url pathname: ‘yarn’,
6 verbose parsed url path: ‘yarn’,
6 verbose parsed url href: ‘yarn’ }
7 silly lockFile d19a2519-yarn yarn
8 verbose lock yarn /home/frappe/.npm/d19a2519-yarn.lock
9 silly lockFile d19a2519-yarn yarn
10 silly lockFile d19a2519-yarn yarn
11 verbose addNamed [ ‘yarn’, ‘’ ]
12 verbose addNamed [ null, ‘’ ]
13 silly lockFile d5475ddd-yarn yarn@
14 verbose lock yarn@ /home/frappe/.npm/d5475ddd-yarn.lock
15 silly addNameRange { name: ‘yarn’, range: '’, hasData: false }
16 verbose url raw yarn
17 verbose url resolving [ ‘https://registry.npmjs.org/’, ‘./yarn’ ]
18 verbose url resolved https://registry.npmjs.org/yarn
19 info trying registry request attempt 1 at 10:56:51
20 http GET https://registry.npmjs.org/yarn
21 info retry will retry, error on last attempt: Error: CERT_UNTRUSTED
22 info trying registry request attempt 2 at 10:57:01
23 http GET https://registry.npmjs.org/yarn
24 info retry will retry, error on last attempt: Error: CERT_UNTRUSTED
25 info trying registry request attempt 3 at 10:58:01
26 http GET https://registry.npmjs.org/yarn
27 silly lockFile d5475ddd-yarn yarn@
28 silly lockFile d5475ddd-yarn yarn@
29 error Error: CERT_UNTRUSTED
29 error at SecurePair. (tls.js:1370:32)
29 error at SecurePair.EventEmitter.emit (events.js:92:17)
29 error at SecurePair.maybeInitFinished (tls.js:982:10)
29 error at CleartextStream.read [as _read] (tls.js:469:13)
29 error at CleartextStream.Readable.read (_stream_readable.js:320:10)
29 error at EncryptedStream.write [as _write] (tls.js:366:25)
29 error at doWrite (_stream_writable.js:223:10)
29 error at writeOrBuffer (_stream_writable.js:213:5)
29 error at EncryptedStream.Writable.write (_stream_writable.js:180:11)
29 error at write (_stream_readable.js:583:24)
30 error If you need help, you may report this log at:
30 error http://github.com/isaacs/npm/issues
30 error or email it to:
30 error npm-@googlegroups.com
31 error System Linux 3.13.0-79-generic
32 error command “/usr/bin/nodejs” “/usr/bin/npm” “install” “yarn”
33 error cwd /home/frappe/frappe-bench
34 error node -v v0.10.25
35 error npm -v 1.3.10
36 verbose exit [ 1, true ]