Thursday 8 November 2018

ERPNext Backup

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:
1. Database backup
2. 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
Restore database backup
erpnext@other-server:~/frappe-bench$ bench restore SQL_FILE_PATH

No comments:

Post a Comment