Hello,
I’m using ERPNext version 10.1.12 and i’d like to know how to automate daily backups for the database with all the files and images in the system?
1 Like
Hi @Ilyes,
you can run a cron job on a shell script, something like this (assuming Debian):
/home/frappe/erpbackup.sh:
cd /home/frappe/frappe-bench
/usr/local/bin/bench backup --with-files
Then, run
$ sudo crontab -e
and enter e.g. for every night at midnight)
0 0 * * * /home/frappe/erpbackup.sh
Also, make sure to pick the files up from /home/frappe/frappe-bench/sites/site1.local/private/backups
and copy to an appropriate storage (extend the script accordingly).
Hope this helps.
6 Likes