Backup script for my PI to a rsync Server (work with my QNAP) It will make 7 backup for the weekdays and a monthly backup (see the MONTHLYSAV variable) So you will get a backup of the last seven days and monthly one.
Just copy/paste the content of the gist backup.sh the file in some folder like /usr/local/bin/backup.sh
Make it runable chmod +x /usr/local/bin/backup.sh
This script need an RSYNC server configured. (see the doc of your NAS or rsync)
Edit the file : change the :
- HOSTNAME - the name you want in the backup folder for this computer.
- SERVER - the name you want in the backup folder for this computer.
- USERNAME - the rsync username RSYNC_PASSWORD - the rsync password PREFIX - prefix of the backup folder AREXCLUDE - a list of folder to exclude for the backup.
Add this in a root crontab. like this
30 19 * * * /usr/local/bin/backup.sh
- A lot of example from the web
- Le tisseurDeToile - this work -
This project is licensed under the MIT License