backupmac hinzu

This commit is contained in:
2021-04-11 14:10:59 +02:00
parent c416499b77
commit a628e15d50

32
backupmac.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
#REPOSITORY=marc@nas:/dat/bak/borg_mac
REPOSITORY=pi@kodi:/media/hdext/borg
#REPOSITORY=/Volumes/nifty/bak/borg
borg create -v --stats --progress --compression zlib --one-file-system \
$REPOSITORY::'{hostname}-{now:%Y-%m-%d}' \
/ \
--exclude '/var/cache/apt/archives/*.deb' \
--exclude '/var/cache/man' \
--exclude '/private/var' \
--exclude '/tmp' \
--exclude '/var/tmp' \
--exclude '/run' \
--exclude '/Users/marc/tmp' \
--exclude '/Users/marc/Downloads' \
--exclude '*/Caches/*' \
--exclude '*/.cache/*' \
--exclude '*/.Trash/*' \
# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly
# archives of THIS machine. The '{hostname}-' prefix is very important to
# limit prune's operation to this machine's archives and not apply to
# other machine's archives also.
#borg prune -v --stats $REPOSITORY --prefix '{hostname}-' \
# --keep-daily=7 --keep-weekly=52 --keep-monthly=48
borg prune -v --stats $REPOSITORY --prefix 'Marcs-' \
--keep-daily=7 --keep-weekly=52 --keep-monthly=48