Working copies between development and production

hi all,

At beginning, we started to use of ERPNext by

  1. installation of a development mode
  2. create a app (just for test, after init., no further development on it)
  3. create our own data for operations
  4. do some customization in: Setup → Customize → Customize form: todo, etc.
  5. backup data: sql and files

After a moment, we has another server

  1. installation of a production mode
  2. restore data from development server: sql and files

it shows me errors, the first one is:

09:11:33 web.1                | Traceback (innermost last):
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 25, in render
09:11:33 web.1                |     data = render_page_by_language(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 91, in render_page_by_language
09:11:33 web.1                |     return render_page(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 107, in render_page
09:11:33 web.1                |     return build(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 114, in build
09:11:33 web.1                |     return build_page(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 127, in build_page
09:11:33 web.1                |     context = get_context(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 11, in get_context
09:11:33 web.1                |     context = get_route_info(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 19, in get_route_info
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 27, in build_route
09:11:33 web.1                |     context = resolve_route(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 46, in resolve_route
09:11:33 web.1                |     return get_generator_route(path)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 57, in get_generator_route
09:11:33 web.1                |     generator_routes = get_generator_routes()
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/website/", line 84, in get_generator_routes
09:11:33 web.1                |     {2}""".format(route_column_name, doctype, condition), as_dict=True):
09:11:33 web.1                |   File "/home/easystore/frappe-bench/apps/frappe/frappe/", line 147, in sql
09:11:33 web.1                |     self._cursor.execute(query)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 205, in execute
09:11:33 web.1                |     self.errorhandler(self, exc, value)
09:11:33 web.1                |   File "/home/easystore/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/", line 36, in defaulterrorhandler
09:11:33 web.1                |     raise errorclass, errorvalue
09:11:33 web.1                |  OperationalError: (1054, "Unknown column 'page_name' in 'field list'")

Is this way is not a right way to do?
I used git to saw the erpnext status, development and production are in different branch: upstream/develop and upstream/master. Is it any way to let my operation data to run in both development and production mode?

My Development working version is:
Installed Apps
2Store: v0.0.1 (just done init. for test and do nothing)
ERPNext: v6.22.1
Frappe Framework: v6.23.3

For my production server, i cannot start it, so cannot list the running versions.


It think there is maybe a misunderstanding of ‘developer mode’ and the git branch ‘develop’.

You still can have the master branch installed in ‘development mode’. That does not mean that you are on the branch called ‘develop’. If you did used any of the publicly posted installation routines I think you should still have installed the ‘master branch’

I think if you do …

cd /home/frappe/bench-repo
git branch

… you will see which git branch you have installed (probably ‘master’)


publicly posted installation routines

Thanks your response, i used a (i guess) a standard development installation method by, not manually installation, it auto. use git upstream/develop by “git status” command.

However, it is partially working now.

In my production server, I missed your manual Restoring From ERPNext Backup before, now i added back “bench --site [sitename] migrate”

I disable supervisor and nginx, then i go to ~/frappe-bench, and type “bench start”. It is working now.

Next step, I will going to start back supervisor and nginx and try further.

Thanks all

not quite clear. Do you meant you have manually added and upstream to your remotes and that upstream reads from the ‘develop’ branch?

when I say git status (inside of /home/frappe/bench-repo) I get

Your branch is up-to-date with ‘origin/master’

And I am in the most standard scenario possible (the official Virtualbox machine)

hi vrms

For all the installation of both development and production, i followed the guide of GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps.

For development, “sudo bash”
For production, “sudo bash --setup-production”
So i mean it is standard method installation, i did not do any upstream / downstream, the “git status” shows us,

  • development: upstream/develop
  • production: upstream/master


@chung_yan_Cheng Ok, can it be that depending on the argument used with the scripts the upstream is determined?
That’s new to me as I haven’t tried anything else then a standard (production) installation.

i believe it is true at this moment, i just follow a guide of GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps.