diff --git a/bakupme.sh b/bakupme.sh new file mode 100644 index 0000000..5bb69aa --- /dev/null +++ b/bakupme.sh @@ -0,0 +1,25 @@ +#!/bin/sh +REPOSITORY=pi@vdrpi:/media/hdext/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 '*/tmp/*' \ + --exclude '/var/tmp' \ + --exclude '*/.cache/*' \ + --exclude '*/cache/*' \ + --exclude '*/.ccache/*' \ + --exclude '*/mlocate.db*' \ + --exclude '/run' + + + + +# 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 $REPOSITORY --prefix '{hostname}-' \ + --keep-daily=7 --keep-weekly=4 --keep-monthly=20 diff --git a/bakupnasdata.sh b/bakupnasdata.sh new file mode 100644 index 0000000..60414bd --- /dev/null +++ b/bakupnasdata.sh @@ -0,0 +1,23 @@ +#!/bin/sh +REPOSITORY=pi@vdrpi:/media/hdext/borg +PREFIX=nasdat + +borg create -v --stats --progress --compression zlib --one-file-system \ + $REPOSITORY::'nasdat-{now:%Y-%m-%d}' \ + /dat/books \ + /dat/audio \ + /dat/docu/Foto \ + --exclude 'tmp' \ + --exclude '*.iso' \ + --exclude '/podcast/cache' \ + --exclude '/run' + + + + +# 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 $REPOSITORY --prefix 'nasdat-' \ + --keep-daily=7 --keep-weekly=4 --keep-monthly=20 diff --git a/bakupnasgps.sh b/bakupnasgps.sh new file mode 100644 index 0000000..5d1cfa1 --- /dev/null +++ b/bakupnasgps.sh @@ -0,0 +1,24 @@ +#!/bin/sh +REPOSITORY=pi@vdrpi:/media/hdext/borg +PREFIX=nasgps + +borg create -v --stats --progress --compression zlib --one-file-system \ + $REPOSITORY::'nasgps-{now:%Y-%m-%d}' \ + /dat/docu/gps \ + --exclude '*/tmp/*' \ + --exclude '*.iso' \ + --exclude '*.exe' \ + --exclude '*.tar*' \ + --exclude '*.tgz' \ + --exclude '*.gz' \ + --exclude '*.zip' + + + + +# 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 $REPOSITORY --prefix 'nasgps-' \ + --keep-daily=7 --keep-weekly=4 --keep-monthly=20 diff --git a/bakupsrc.sh b/bakupsrc.sh new file mode 100644 index 0000000..037aa69 --- /dev/null +++ b/bakupsrc.sh @@ -0,0 +1,34 @@ +#!/bin/sh +REPOSITORY=pi@vdrpi:/media/hdext/borg +PREFIX=nassrc + +borg create -v --stats --progress --compression zlib --one-file-system \ + $REPOSITORY::'nassrc-{now:%Y-%m-%d}' \ + /dat/src \ + --exclude '*/tmp/*' \ + --exclude '*/.build*/' \ + --exclude '*/build*/' \ + --exclude '*/cache*' \ + --exclude '*/.cache/*' \ + --exclude '*/.ccache/*' \ + --exclude '*/sstate*' \ + --exclude '*/dl/*' \ + --exclude '*.o' \ + --exclude '*.ko' \ + --exclude '*.so' \ + --exclude '*.tar*' \ + --exclude '*.tgz' \ + --exclude '*.gz' \ + --exclude '*.zip' \ + --exclude '*/staging*/*' \ + --exclude '/run' + + + + +# 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 $REPOSITORY --prefix 'nassrc-' \ + --keep-daily=7 --keep-weekly=4 --keep-monthly=20