Restore on Local Machine

I was not aware I was restoring the whole image of the VM, I was under the impression that was the site name

So how can I find out [sitename]?

Your site name is erpnext.vm
What’s the procedure you are using to backup and restore ?

So if site name is erpnext.vm why did you think I was restoring the whole virtual machine?

The steps I am using is in post number 1

The backup comes from which i download and then upload to my own server (because wget does not want to work on

Then I run oracle virtual machine and do:

goto frappe-bench folder
Gunzip backup.sql.gz
bench --site erpnext.vm --force restore home/frappe/frappe-bench/backup.sql
It get asked for the MySql password so I enter “frappe”

That used to work. Now it gives Internal Server Error when i access localhost:8080

I had not noticed these additions:
bench --site [sitename] remove-from-installed-apps frappe_subscription
bench --site [sitename] migrate

But tried them now and there is no change

I have also tried various combinations of your earlier suggestions with uninstalling apps etc, and still get the same error

To be honest the lack of a proper backup / restore system fills me with dread as I try to evaluate this system to determine it’s suitability for our organisation

Backup and restore should be possible within the program, not require server side manipulations that most users will not have a clue about

Sorry I missed your posts because am answering many posts at one time using my mobile device not computer as I am on business travel and I am not a frappe developer / worker but I am a community user that’s it :slight_smile:

Do you want me to access to debug your server throw team viewer ? I would be happy to help any time on what I can do…

But in one thing u need to know the new installation of any Erpnext server using scripts not vm will use port 80 not 8080

And you can change it in the site_config file in the erpnext.vm folder…

Or use
bench set-nginx-port 80
bench setup
bench restart

And open on port 80

@ramielian I appreciate your help but i give up.

I have spent hours, no days and days, trying to do what should be a simple restore. I will give up and watch carefully for V7, see if that has a proper backup and restore system

I think you are missing the main point in here: your restore have nothing to do with this error, its system configuration error not site restore Problem…

The site restore could be as simple as using import tool in Maria db to restore the database you have…
So the force restore is not your only option…

But your error is nginx related and you need a server admin to look at your configuration files for nginx…

May @vjFaLk (hi there :slight_smile: ) could help you more than me after this…

Hey @Ron_Taylor, the backup-restore system works alright.

This is what you should do from the get go. At this point I suggest spinning up a new VM with the image provided, and make sure it’s the latest one and then update it by running bench update. Don’t run the setup or anything.

Then follow the below steps
bench --site [sitename] --force restore /path/to/SQLFILE bench --site [sitename] remove-from-installed-apps frappe_subscription bench --site [sitename] migrate

This should do it.

Hi @vjFaLk

that is what I have been doing, over, and over and over again. Uninstalling VM (and even Oracle) every time. But still internal server error.

I will leave it for now. Not sure ERPNExt is going to be the solution for us.

I’m sorry you’re having troubles with restoring your data. If you decide to pick it back up again later just check if your VM is the latest and the braches for your ERPNExt and Frappe apps are in master.

The latest VM file is named : ERPNext-190416.ova

The way you check branches is by going into the frappe-bench/apps/frappe and frappe-bench/apps/erpnext folder and running the command git status

That will give you either “On branch develop” or “On branch master”. It should be “master”

Along with that, do you get an error when you do bench migrate?

OK back to this problem

I have upgraded to the hosted solution (5 user). I had hoped they could help but have pointed out to me that their support is only for the cloud, external backup / restore is not part of their remit. :confused:

What they did say is that I am getting error messages and advise I paste the error message here

But I have no idea how. I am using Oracle virtual machine so I can see a screen like this

can anyone explain how I can copy and paste from there to here because it does not seem to work

These are the steps I have taken:

See the post linked:

thanks, tried that. No error messages now that I can see, but I still get the internal server error when accessing localhost:8080

I am getting lots of advice, but wonder if anyone else has actually installed Oracle VM on their windows computer and tried a restore? Has anyone actually managed to do this?

I have done exactly this. Ours is from a self-hosted version of erpnext and I use a VM to do development work. I often restore the database from our production server to my VM in order to use our latest data.

Have you tried bench restart? What message do you get when you try? Does everything stop and start properly? You should see:

frappe@erpnext:~/frappe-bench$ bench restart frappe-bench-frappe-schedule: stopped frappe-bench-frappe-default-worker-0: stopped frappe-bench-frappe-long-worker-0: stopped frappe-bench-frappe-short-worker-0: stopped frappe-bench-frappe-web: stopped frappe-bench-node-socketio: stopped frappe-bench-frappe-schedule: started frappe-bench-frappe-default-worker-0: started frappe-bench-frappe-long-worker-0: started frappe-bench-frappe-short-worker-0: started frappe-bench-node-socketio: started frappe-bench-frappe-web: started

Thanks for the confirmation Ben. So it should be possible, unless hosted somehow has different backup files

I have tried the restart, no effect. Same error. Incidentally how are you copy and pasting from VM? I cant copy the info from the VM to show messages etc. Can;t even scroll back up

Did you manage to look at the drop box document. Am I following the correct procedure?

Yes, using the VM means you can’t do any of those things. I end up using Putty to remote console in to my VM. Lets you copy and paste and scroll.

I just noticed the dropbox link.

Here are my recommendations:

  1. Start a new VM.
  2. Run bench update. Do not move to the next step until bench update successfully completes (no error messages)
  3. Follow your procedure for getting the back up and restoring using step 13 from your instructions. I’m not sure you need to specify the site. I also know that your VM needs to have all the correct apps installed before trying to restore. What I think this means is you might need to install erpnext subsrcription to your VM before running the restore.

I think one of the big issues you’re having is that you’re moving on to the next step when there are still errors from a previous step. When I went through the process, I tried the same thing and kept getting stumped. The only way I got it working was to make sure there were no issues before moving on.

Based on your dropbox post issue (step 9), resolving the bench update issue is easy:
Go to bench-repo folder git fetch git pull origin Go back to frappe-bench folder Run bench update

I hope this helps. If you run into any other errors, just post them and we can work through them. A successful bench update (run the second time after everything is updated) should look something like this (depending on the apps you have installed):

frappe@erpnext:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages frappe
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch develop → FETCH_HEAD
    Already up-to-date. erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch develop → FETCH_HEAD
    Already up-to-date. erpnext_demo
    From GitHub - frappe/erpnext_demo: Deprecated with Version 7 (will work till v6)
  • branch master → FETCH_HEAD
    Already up-to-date. paypal_integration
    From GitHub - frappe/paypal_integration: Paypal API Integrations
  • branch master → FETCH_HEAD
    Already up-to-date.
    /home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indicat ion) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Pytho n to solve this. For more information, see
    /home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ InsecurePlatformWarning: A true SSLContext object is not available. This prevents ur llib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.or g/en/latest/security.html#insecureplatformwarning.
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
    Migrating erpnext.vm
    Updating frappe : [========================================]
    Updating erpnext : [========================================]
    Updating paypal_integration : [========================================]
    Updating velometro : [========================================]
    Wrote ./assets/js/print_format_v3.min.js - 18k
    Wrote ./assets/js/frappe-web.min.js - 108k
    Wrote ./assets/js/form.min.js - 130k
    Wrote ./assets/js/report.min.js - 158k
    Wrote ./assets/js/erpnext.min.js - 70k
    Wrote ./assets/css/list.min.css - 7k
    Wrote ./assets/js/item-dashboard.min.js - 6k
    Wrote ./assets/js/d3.min.js - 343k
    Wrote ./assets/css/report.min.css - 7k
    Wrote ./assets/css/frappe-web.css - 56k
    Wrote ./assets/js/list.min.js - 75k
    Wrote ./assets/js/dialog.min.js - 60k
    Wrote ./assets/js/desk.min.js - 237k
    Wrote ./assets/css/form.min.css - 2k
    Wrote ./assets/js/editor.min.js - 26k
    Wrote ./assets/css/erpnext.css - 3k
    Wrote ./assets/js/libs.min.js - 658k
    Wrote ./assets/js/erpnext-web.min.js - 1k
    Wrote ./assets/css/desk.min.css - 263k
    Wrote ./assets/css/module.min.css - 2k
    frappe-bench-frappe-schedule: stopped
    frappe-bench-frappe-default-worker-0: stopped
    frappe-bench-frappe-long-worker-0: stopped
    frappe-bench-frappe-short-worker-0: stopped
    frappe-bench-frappe-web: stopped
    frappe-bench-node-socketio: stopped
    frappe-bench-frappe-schedule: started
    frappe-bench-frappe-default-worker-0: started
    frappe-bench-frappe-long-worker-0: started
    frappe-bench-frappe-short-worker-0: started
    frappe-bench-node-socketio: started
    frappe-bench-frappe-web: started

Bench: Open source installer + admin for Frappe and ERPNext (


Installed fresh VM. Ran bench update after bech-repo tweak.

No errors - progress:)

Installed erpnext and made sure the installed apps matched what I have on the live version. The only one I could not install is the frappe subscription app as that was not available. (is there a way of installing that from VM?)

when i run the restore command i get
Traceback (innermost last): File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 54, in application init_request(request) File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 115, in init_request frappe.local.http_request = frappe.auth.HTTPRequest() File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 45, in __init__ frappe.local.login_manager = LoginManager() File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 103, in __init__ self.make_session(resume=True) File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 154, in make_session full_name=self.full_name, user_type=self.user_type) File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 166, in __init__ self.resume() File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 232, in resume frappe.local.user_lang = frappe.translate.get_user_lang( File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 55, in get_user_lang user_lang = frappe.db.get_value("User", user, "language") File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 397, in get_value ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, cache=cache) File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 445, in get_values out = self.get_values_from_single(fields, filters, doctype, as_dict, debug, update) File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 485, in get_values_from_single tuple(fields) + (doctype,), as_dict=False, debug=debug) File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 136, in sql self._cursor.execute(query, values) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 205, in execute self.errorhandler(self, exc, value) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 36, in defaulterrorhandler raise errorclass, errorvalue ProgrammingError: (1146, "Table 'd56cb677ea.tabSingles' doesn't exist")

At what point in the restore does this happen?

It looks like it is having an issue finding the data for one of your users, or maybe an issue getting the language setting for one of your users. I’m really not too sure how to fix this one. Try a bench migrate on your database before backup and restore?

Does anyone have any other suggestions?


I think. I dare not uninstall and try again to check :wink:

I installed a fresh VM then tried the restore without running the bench update and it seems to have worked


Hello @vjFaLk , while doing bench migrate, I got this error. Can you please help.