Backup And Restore Site from one VM to Another

Hi,

I would like to take backup of one site from ERPNext and restore it to another VM.
I am using Ubuntu. I search a lot but no luck. can you please provide me steps to take backup of site from one VM and restore it to another VM. I have gone through below Posts

What have you tried? What didn’t work for you?
bench --site sitename backup will store a backup at sites/sitename/private/backups.

Then, transfer the file to your other vm, restore it with
bench --site sitename restore backup_filename.sql.gz

I am getting “Internal Server Error”.

I have created new site and then restore the site on that new setup.
Below are the commands i tries but nothing works

sudo service nginx reload
sudo service supervisor start
sudo supervisorctl status

Ususally Internal Server Error indicates a config error of the server app not nginx etc. Check your erpnext config on new vm config to ensure its the same as the previous vm

I’m getting an error while running the Restore command: Exception: Database 46459e8459d14de1 already exists. And when I open localhost:8080, I cannot see my old site. Any ideas on how to get around this?