Python file backup script with functionality:
- Sending email notifications
- Keeping only given number of backups
- Mounting/unmounting disk if it is mountpoint
- Some more on the way
List of cmd line parameters
-d, --directory
List of directories to backup.Can be specified multiple times.
-t, --targetdir
Backup target directory
-m, --mountpoint
Mount point must be mounted befor backup
-k, --keepbackups
Number of backups to keep
-e, --email
Email to send notifications to.
-f, --from
Email sender address.No meaning without --email
-s, --smtpserver
SMTP server to use
--dry-run
Don't do back just check env, if problems found sends email and displays message"
--directory=/srv/mail
--directory=/srv/samba
--directory=/srv/postgresql
--targetdir=/mnt/backup/
--email=admin
--smtpserver=localhost:25
--mountpoint=/mnt/backup
Python modules :
- tqdm