How can we make daily backup with all the files

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):


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/

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.


Hi @lasalesi,
thank you for your answer, i’m using Ubuntu 16.04

Hi @Ilyes,
that should work on Ubuntu as well (as it is derived from Debian)…

1 Like