Bench backup issue after changing site.local to

I have changed site name from default (site1.local) to some random name like with all configuration needed and site works fine with that domain name.

But when i am trying to run backup using “bench backup --with-files” its showing me below errors:

Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/”, line 79, in
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/”, line 16, in main
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 716, in call
return self.main(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 696, in main
rv = self.invoke(ctx)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 895, in backup
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 121, in init
local.conf = _dict(get_site_config())
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/”, line 175, in get_site_config
raise IncorrectSitePath, “{0} does not exist”.format(site_config)
frappe.exceptions.IncorrectSitePath: 404: Not Found

Renaming the site from to site1.local resolved that issue but i need to make the site as to correct sales order showing that site.local links and to make custom name.

Could someone suggest me how i can do this ?

Add a host_name property to site_config.json and set it to the domain you want to use

Eg :


I have already tried that modification by adding hostname entry to point to my domain and restart nginx and bench processes but its still not works.

Try running bench setup nginx and see if that works?

Shouldn’t cause problems. Check if site_config.json exists at sites/

@vjFaLk @anand,

Thanks for your reply.

I have tried “bench setup nginx” command and it works with no error, but i am still facing same error using “bench backup --with-files”

@anand, yes i have site_config.json with “host_name”:“” configuration and backup works fine if i renamed it back to site.local.