Created
April 19, 2021 07:30
-
-
Save david-bergstrom/5dcaab09ba187de7e25f6226854b6786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPOSITORY=david@srg04:backups/kvasir-root/ | |
export BORG_PASSPHRASE='' | |
borg create \ | |
--list --filter=AME \ | |
--stats \ | |
--compression auto,lzma,9 \ | |
--exclude-if-present .borgignore \ | |
--exclude '/home/david/.aur' \ | |
--exclude '/home/david/.backup' \ | |
--exclude '/home/david/.cache' \ | |
--exclude '/home/david/.config/Code/Cache' \ | |
--exclude '/home/david/.config/Code/CachedData' \ | |
--exclude '/home/david/.config/Microsoft' \ | |
--exclude '/home/david/.config/Slack' \ | |
--exclude '/home/david/.config/chromium' \ | |
--exclude '/home/david/.config/discord' \ | |
--exclude '/home/david/.julia' \ | |
--exclude '/home/david/.local' \ | |
--exclude '/home/david/.mozilla' \ | |
--exclude '/home/david/.msoffice' \ | |
--exclude '/home/david/.npm' \ | |
--exclude '/home/david/.nv' \ | |
--exclude '/home/david/.vagrant.d' \ | |
--exclude '/home/david/.vim/plugged' \ | |
--exclude '/home/david/.wine' \ | |
--exclude '/home/david/node_modules' \ | |
--exclude '/home/david/results' \ | |
--exclude '/home/david/singularity' \ | |
--exclude '/home/david/snap/spotify' \ | |
--exclude '/home/david/tmp' \ | |
--exclude '/root/root-borg' \ | |
--exclude '/root/top' \ | |
--exclude '/var/cache' \ | |
--exclude '/dev' \ | |
--exclude '/mnt' \ | |
--exclude '/proc' \ | |
--exclude '/run' \ | |
--exclude '/sys' \ | |
--exclude '/tmp' \ | |
$REPOSITORY::'{hostname}-root-arch-{now:%Y-%m-%d-%H-%M}' \ | |
/ | |
borg prune -s -v --list $REPOSITORY --prefix '{hostname}-root-arch-' \ | |
--keep-hourly=168 --keep-daily=31 --keep-weekly=8 --keep-monthly=24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment