Ich bin ein Freund von borg-backup, das laeuft bei mir einmal die Stunde und haelt mir die letzten 6 Wochen versioniert bereit
Hier ein Beispiel, geht aber auch auf remote Hosts via rsync/ssh/...
Code:
#!/bin/bash
## Mount eines dedizierten Standes Beispiel
## ~/bin/borg-linux64 mount /backup/desk/home::Sonntag-20-19 2
## Some Variables
ALL=us_US
Datum=$(date "+%A-%H-%M")
BorgBinary="$HOME/bin/borg-linux64"
## Do the Backup
nice -n 19 $BorgBinary create -x -p -v --stats --compression zlib,8 \
/backup/desk/home::$Datum $HOME \
--exclude svn \
--exclude git \
--exclude owncloud \
--exclude musik \
--exclude 1 \
--exclude .cache/
nice -n 19 $BorgBinary create -x -p -v --stats --compression zlib,8 \
/backup/desk/etc::$Datum /etc
## Remove Older than
# Keep last Backup of an hour for 72 Hours
# Keep Last Backup of the Day for 14 Days
# Keep Last Backup of the Week for 6 Week
# Nothing needed would deleted, only unused chunks would removed
nice -n 19 $BorgBinary prune --keep-hourly=72 --keep-daily=14 --keep-weekly=6 \
/backup/desk/home
nice -n 19 $BorgBinary prune --keep-hourly=72 --keep-daily=14 --keep-weekly=6 \
/backup/desk/etc
Lesezeichen