Move bench site to different server

On old server

bench –site [sitename] backup –with-files

Download files from ./sites/[sitename]/private/backups/

Also make copy of site_config.json of the old server site to retrieve the encryption key

On new server

Create new site and install erpnext

sudo mkdir /tmp/old_server_files
sudo chown -R ubuntu:ubuntu /tmp/old_server_files

Upload files using SFTP (Filezilla)

sudo chown -R root:root /tmp/old_server_files

sudo gunzip [/path/to/database/file.sql]
sudo bench –site [] –force restore [/path/to/database/file.sql] –with-private-files [/path/to/private/files.tar] –with-public-files [/path/to/public/files.tar]


sudo bench –force –site restore /path/to/backup.sql.gz


bench --site [sitename] --force restore [path to database backup file] --with-private-files [relative-path-to-private-files-backup-file] --with-public-files [relative-path-to-public-files-backup-file]

Sources – (backup all sites)

Newsletter Updates

Enter your email address below to subscribe to my newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *