Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # initialize the repo with the command:
- # borg init --encryption=none /mnt/C1/borg_backups/ja_borg
- # then run this script
- REPOSITORY=/mnt/C1/borg_backups/ja_borg
- HOME_PATH_TO_BACKUP=/home/ja
- borg create --progress --verbose --stats --compression lz4 \
- $REPOSITORY::`date +%Y-%m-%d` \
- $HOME_PATH_TO_BACKUP \
- --exclude /home/*/.cache \
- --exclude /home/*/.thumbnails \
- --exclude /home/*/Downloads/ \
- --exclude /home/*/VirtualBox/ \
- --exclude /home/*/.local/share/Trash \
- sleep 5
- borg prune -v $REPOSITORY \
- --keep-daily=7 --keep-weekly=4 --keep-monthly=3
- # --- USEFULL SHIT ---
- # go in to repo folder, to list available backups:
- # borg list .
- # to mount one of them:
- # borg mount .::2016-04-25 ~/temp
- # to umount:
- # borg umount ~/temp
- # to delete single backup in a repo:
- # borg delete .::2016-04-25
Add Comment
Please, Sign In to add comment