Virtual Machine - backup from ERPNext.com does not work when restored on local VirtualBox?

So what has changed?

We used virtual machine a few months ago to test some stuff. We downloaded the backup from ERPNExt cloud via drop box and “restored” in the local machine in Oracle Virtual Machine

Come to do it again and nothing works

Can anyone point me into the direction on how to restore a backup in virtual machine

Thanks

VM aside - you perhaps followed revant’s guide for your restore? Backup & Restore - #3 by Jonathan_Fanny_Lie

You may need to sync your virtual machine version of ERPNext to database version. I faced a problem whereby the columns were missing in the database but the new version of ERPnext app caused it not to work. What is the error message that you are getting?

2 Likes

I would tend to agree with @aakvatech that your database schema may be different between ERPNext versions. This may or not affect you but is certainly possible vto cause so major issues

Yes agreed so on ‘bench restore’ or ‘bench start’ you should have an exception that confirms the app + data mismatch and the need run ‘bench update’ and ‘bench migrate’

Thanks all, but nothing to do with tables and erpnext versions.

I am talking about a totally fresh install, and differences even before I get to the restore point

Looking at my notes from when I did this weekly

Step 1- Download and isntall OVA into fresh install of Oracle Virtual Box - Tick
Step 2 - “Start” the session - Tick
Step 3- Erpnext login - Now says Ubuntu log in. But still accepts frappe as username and password so I guess that is a tick?
Step 4: From the command prompt type “cd tmp” press the enter key - now this is different. The command prompt used to be frappe@erpnext, but it is now frappe@ubuntu.
But I still type cd tmp but I get the message no such file or directory
Doing “ls” shows the tmp folder is not there

So I ignore that (:slight_smile:) and move on to step 5
Step 5, Type , wget Dropbox - Error
This seems to work
Step 6 was Type bench --site erpnext.vm --force restore /home/frappe/tmp/backup.sql
Then press enter

But this does not work as erpnext.vm does not seem to exist, and the file location to backup is obviously different as well

Please repeat Steps 3 on but post verbatim the command you entered and the response you get. For you to copy and paste that here will help troubleshoot.

For eg. a session like this:

frappe@ubuntu:~/frappe-bench$ cd tmp
-bash: cd: tmp: No such file or directory
frappe@ubuntu:~/frappe-bench$ wget Dropbox - Error
–2018-12-12 21:48:14-- Dropbox - Error
Resolving www.dropbox.com (www.dropbox.com)… 162.125.11.1, 2620:100:6050:1::a27d:b01
Connecting to www.dropbox.com (www.dropbox.com)|162.125.11.1|:443… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: /s/raw/fdsfdsfdsvr4wr/backup.sql.gz [following]
–2018-12-12 21:48:14-- https://www.dropbox.com/s/raw/fdsfdsfdsvr4wr/backup.sql.gz
Reusing existing connection to www.dropbox.com:443.
HTTP request sent, awaiting response… 404 Not Found
2018-12-12 21:48:14 ERROR 404: Not Found.

frappe@ubuntu:~/frappe-bench$ bench --site erpnext.vm --force restore /home/frappe/tmp/backup.sql
Invalid path /home/frappe/tmp/backup.sql

1 Like

OK, so the question was about what has changed in the OVA virtualbox system

Having now managed to restore I can say that these things have changed

  1. Command prompt has changed from frappe@erpnext, to frappe@ubuntu
  2. tmp folder no longer exists
  3. Name of site has changed from erpnext.vm to site1.local

So this process now works for me

  1. Download Virtualbox
  2. Download OVA
  3. Import OVA to virtualbox
  4. Start OVA process
  5. When prompted login with username"frappe" and password “frappe”
  6. Use “cd frappe-bench” to change directory to “frappe-bench”
  7. wget https://www/dropbox.com/s/fdhhejkrhje/backup.sql.gz (or wherever your backup sql is located)
  8. Type gunzip backup.sql.gz to unzip the backup file
  9. type bench --site site1.local --force restore /home/frappe/frappe-bench/backup.sql

This could take a while depending on the size of your sql file

  1. Type bench --site1.local remove-from-installed-apps frappe_subscription

  2. Type bench --site site1.local remove-from-installed-apps mandrill_integration

  3. Type bench --site site1.local remove-from-installed-apps mandrill_integration

  4. Type bench --site site1.local migrate

  5. Open your web browser and type “localhost:8080” into the address bar

Hi @Ron_Taylor

Pleased you got it working now. I understand you’re in the UK like me. The company I work for is expanding its use of ERPNext and so far it’s going well.

Perhaps next year we should think about a meet up for UK users of the system?

Julian