Unable to restore backup


I managed to get the latest developer ERPNext working on a cloud server after several tries by using the tutorial on GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps. The easyinstall script didnt seem to work on fresh install of Ubuntu for some reason.

But after installing, when I restored the backup using bench restore, I got the following error:

table not found error

The backup was done on erpnext 12 and I am restoring on v13.

Any ideas what should be done?


I would first restore on V12 and later migrate to V13

How to install v12? I tried switching branches but it didn’t work :frowning: it gave me all sorts of error.

Any detail guides to this?


Currently there are three versions running.

V10 => V10.x.x (branch)
v11 => Master (branch)
v12 => Develop (branch)

Can you share the error traceback which you encountered while restoring backup.

So, the backup was extracted from ERPNext hosted and managed by ERPNext itself.

Some context: We are looking to build a custom app and API and to integrate it with ERPNext itself so we are planning to shift to self-hosted ERPNext rather than managed hosting. Is there any way to run custom code on managed hosting by ERPNext?

The error traceback(restore was successful but cant open ERPNext after that):

Traceback (most recent call last):
File “/home/frappe/b/apps/frappe/frappe/middlewares.py”, line 15, in call
return super(StaticDataMiddleware, self).call(environ, start_response)
File “/home/frappe/b/env/lib/python2.7/site-packages/werkzeug/middleware/shared_data.py”, line 227, in call
return self.app(environ, start_response)
File “/home/frappe/b/env/lib/python2.7/site-packages/werkzeug/middleware/shared_data.py”, line 227, in call
return self.app(environ, start_response)
File “/home/frappe/b/env/lib/python2.7/site-packages/werkzeug/local.py”, line 231, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File “/home/frappe/b/env/lib/python2.7/site-packages/werkzeug/wrappers/base_request.py”, line 235, in application
resp = f(*args[:-2] + (request,))
File “/home/frappe/b/apps/frappe/frappe/app.py”, line 78, in application
response = frappe.utils.response.handle_session_stopped()
File “/home/frappe/b/apps/frappe/frappe/utils/response.py”, line 209, in handle_session_stopped
return frappe.website.render.render(“message”, http_status_code=503)
File “/home/frappe/b/apps/frappe/frappe/website/render.py”, line 34, in render
File “/home/frappe/b/apps/frappe/frappe/website/redirect.py”, line 24, in resolve_redirect
redirects += frappe.db.get_all(‘Website Route Redirect’, [‘source’, ‘target’])
File “/home/frappe/b/apps/frappe/frappe/database/database.py”, line 526, in get_all
return frappe.get_all(*args, **kwargs)
File “/home/frappe/b/apps/frappe/frappe/init.py”, line 1281, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/frappe/b/apps/frappe/frappe/init.py”, line 1254, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/frappe/b/apps/frappe/frappe/model/db_query.py”, line 94, in execute
result = self.build_and_run()
File “/home/frappe/b/apps/frappe/frappe/model/db_query.py”, line 108, in build_and_run
args = self.prepare_args()
File “/home/frappe/b/apps/frappe/frappe/model/db_query.py”, line 130, in prepare_args
File “/home/frappe/b/apps/frappe/frappe/model/db_query.py”, line 281, in set_optional_columns
columns = frappe.db.get_table_columns(self.doctype)
File “/home/frappe/b/apps/frappe/frappe/database/database.py”, line 848, in get_table_columns
raise self.TableMissingError


v13? If I did not miss anything terribly there is no v13 Releases · frappe/erpnext · GitHub

v11 = stable
v12 = develop

I am sorry. My bad, I got it messed up. I exported from v10(managed ERP Hosting) and am trying to import it on ERP v12= develop,

v10.1.10 ERPNext to be precise

After restoring backup, run bench --site your_site_name migrate

1 Like

Now I get the following error

frappe.exceptions.ValidationError: Options must be a valid DocType for field Payroll Period in row 5

I have setup several other open source projects in the past but this I am just not able to understand and setup. Am I missing something here? I have been getting errors after errors… during downloading, installation, backing up, restoration. Finally after giving up, I have decided to ask here on forums, I hope it works out! Thanks in advance! :slight_smile:

please pull latest code for both applications erpnext and frappe and rerun bench migrate command.