Backing up your ERPNext site
Apr 07, 2017
ERPNext assumes that as a site administrator you are well versed with linux (or variants) commands to execute backup and restore procedure.
ERPNext provides a bench command for this purpose. The
bench command is available on the server that hosts ERPNext. I use Ubuntu 16.04 LTS on Amazon Elastic Cloud Computing (EC2).
To backup the ERPNext instance I login to the Amazon server and execute the following commands.
sudo su - frappe
bench backup --with-files
--with-files option ensures that all files (e.g., logos, background images or other files you have uploaded to your ERP site) are backed up.
The backup file is made available in a directory
To restore a site, I use the following command after logging into the frappe account on the server and changing directory to frappe-bench.
bench restore <path to the backup file>
If you want, you can download the backup file to your local maching by opening your ERP site and going to
Setup -> Download Backups