Trying to restore a backup from to with no luck

Hi comrades,

I’m trying to restore a backup from to

But when I type on the browser it goes well on the first page, it shows with no problem on the address bar, but when i click on login or any link, for example, it immediately redirects to the domain

I used these commands:

bench new-site --install-app erpnext
bench --site add-to-hosts
bench setup add-domain --site
sudo setup wildcard-ssl
bench set-url-root
bench setup nginx
sudo service nginx reload

bench --site restore /home/user/bench/sites/ --with-public-files /home/user/bench/sites/ --with-private-files /home/user/bench/sites/

I think i missing a step. Or perhaps this is not the correct way to restore a site in a different domain.

Does anyone could please help me?

Thank you in advance.


Looks like you missed setting up multi-tenancy. So the first site is being used by default.

What you’re looking for is DNS based multitenancy.

The documentation will go into a little more detail about this:

Thank you you Keneth,

Well I didn’t mentioned, the server was already on DNS Multitenancy, working with no problems with other 5 sites, running with Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-128-generic x86_64).
Bench version 5.2.1
Frappe 13.0.0-beta.8
Erpnext 13.0.0-beta.6


Also the server is in production mode.

I will try to restore the backup on a FrappeCloud server.

How about the hostname value in frappe-bench/sites/sitename? Could that be the reason?



Thank you Jay,

The hostname of the destination site is ok in /home/user/frappe-bench/sites/
Also site_config.json has this config:

“domains”: [”,
“host_name”: “”,