10 lines
377 B
Bash
10 lines
377 B
Bash
|
#!/bin/bash
|
||
|
exec &>>/var/log/restic.log
|
||
|
source /etc/restic/restic_env.sh
|
||
|
cd ${BACKUP_ROOT}
|
||
|
date +"%h %e %T $HOSTNAME restic $$[$BASHPID]: Starting backup"
|
||
|
restic backup --exclude-file /etc/restic/excludes.txt .
|
||
|
date +"%h %e %T $HOSTNAME restic $$[$BASHPID]: Pruning old files"
|
||
|
restic prune >> /var/log/restic.log
|
||
|
date +"%h %e %T $HOSTNAME restic $$[$BASHPID]: Backup complete"
|