change to bench directory
erpnext@server:~$ cd frappe-bench/
erpnext@server:~/frappe-bench$
use command
erpnext@server:~/frappe-bench$ bench backup
or command
erpnext@server:~/frappe-bench$ bench backup-all-sites
your database backups will be in ~/frappe-bench/sites/[sitename]/private/backups/
check out for the most recent backup with current time, there may be backups there already.
Now take backups of files
erpnext@server:~/frappe-bench/sites/[sitename]/public$ tar cvf ~/[sitename]-files.tar files
2 Backup files:
- Database backup
- Files backup
Setup bench on other machine where you want to restore.
Extract files in appropriate site’s sub directory ~/frappe-bench/sites/[sitename]/public and restore database backup.
erpnext@other-server:~/frappe-bench$ bench restore SQL_FILE_PATH
for more info
$ bench restore --help