Skip to content

Commit

Permalink
Merge pull request erikw#18 from toddejohnson/missing-dir
Browse files Browse the repository at this point in the history
Fix missing directories on install
  • Loading branch information
erikw authored Jul 13, 2019
2 parents a489e44 + c065dc0 commit bfad34f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions usr/local/sbin/restic_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ RETENTION_MONTHS=18
RETENTION_YEARS=3

# What to backup, and what to not
BACKUP_PATHS="/ /boot /home /mnt/media"
BACKUP_EXCLUDES="--exclude-file /etc/restic/backup_exclude --exclude-file /mnt/media/.backup_exclude --exclude-file /home/erikw/.backup_exclude"
BACKUP_PATHS="/ /boot /home"
[ -d /mnt/media ] && BACKUP_PATHS+=" /mnt/media"
BACKUP_EXCLUDES="--exclude-file /etc/restic/backup_exclude"
for dir in /home/*
do
if [ -f "$dir/.backup_exclude" ]
then
BACKUP_EXCLUDES+=" --exclude-file $dir/.backup_exclude"
fi
done

BACKUP_TAG=systemd.timer


Expand Down

0 comments on commit bfad34f

Please sign in to comment.