5 # Script used for non-privileged backup; the backup user must have sudo
8 ### Configuration -- change as needed.
10 # Steinar, Trygve Tønnesland, Skolmli
11 GPG_RECIPIENTS="-r 77978F76 -r 9AE75F05 -r 2DF56ABC"
12 EXCLUDEFROM=/home/samfundetbackup/.backup/exclude
20 # Don't allow people to give odd options
21 if echo "$FILESYSTEM" | /bin/grep -Eq ^-; then
22 echo Invalid filesystem. Exiting. 1>&2
25 if [ x"$FILESYSTEM" = x"" ]; then
26 echo Missing filesystem. Exiting. 1>&2
30 # Check if we have a valid date
31 if echo "$LASTDATE" | /bin/grep -Eq '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}$'; then
32 /usr/bin/nice -n 19 /usr/bin/ionice -c3 /bin/tar --ignore-failed-read --warning=no-file-changed --warning=no-file-ignored --one-file-system -c -C "$FILESYSTEM" --newer="$LASTDATE" --exclude-from="$EXCLUDEFROM" . | /usr/bin/pigz | /usr/bin/gpg --sign --encrypt --cipher-algo aes --compress-algo none $GPG_RECIPIENTS
34 /usr/bin/nice -n 19 /usr/bin/ionice -c3 /bin/tar --ignore-failed-read --warning=no-file-changed --warning=no-file-ignored --one-file-system -c -C "$FILESYSTEM" --exclude-from="$EXCLUDEFROM" . | /usr/bin/pigz | /usr/bin/gpg --sign --encrypt --cipher-algo aes --compress-algo none $GPG_RECIPIENTS