From e3f01b7911909f7cb3b4a61bfbf06cdc7b27015d Mon Sep 17 00:00:00 2001 From: Todd E Johnson Date: Sat, 13 Jul 2019 00:09:58 -0500 Subject: [PATCH] Move /.backup_exlude to /etc/restic/backup_exclude --- Makefile | 10 ++-------- .backup_exclude => etc/restic/backup_exclude | 0 usr/local/sbin/restic_backup.sh | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) rename .backup_exclude => etc/restic/backup_exclude (100%) diff --git a/Makefile b/Makefile index 5562134..d39b9ec 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,15 @@ # Not file targets. -.PHONY: help install install-scripts install-conf install-exclude install-systemd +.PHONY: help install install-scripts install-conf install-systemd ### Macros ### SRCS_SCRIPTS = $(filter-out %cron_mail, $(wildcard usr/local/sbin/*)) SRCS_CONF = $(filter-out %template, $(wildcard etc/restic/*)) -SRCS_EXCLUDE = .backup_exclude SRCS_SYSTEMD = $(wildcard etc/systemd/system/*) # Just set PREFIX in envionment, like # $ PREFIX=/tmp/test make DEST_SCRIPTS = $(PREFIX)/usr/local/sbin DEST_CONF = $(PREFIX)/etc/restic -DEST_EXCLUDE = $(PREFIX)/ DEST_SYSTEMD = $(PREFIX)/etc/systemd/system @@ -24,7 +22,7 @@ help: @egrep "#\starget:" [Mm]akefile | sed 's/\s-\s/\t\t\t/' | cut -d " " -f3- | sort -d # target: install - Install all files -install: install-scripts install-conf install-exclude install-systemd +install: install-scripts install-conf install-systemd # target: install-scripts - Install executables. @@ -44,10 +42,6 @@ install-conf: | etc/restic/b2_env.sh etc/restic/b2_pw.txt install -d $(DEST_CONF) install -m 0600 $(SRCS_CONF) $(DEST_CONF) -# target: install-exclude - Install backup exclude file. -install-exclude: - install $(SRCS_EXCLUDE) $(DEST_EXCLUDE) - # target: install-systemd - Install systemd timer and service files install-systemd: install -d $(DEST_SYSTEMD) diff --git a/.backup_exclude b/etc/restic/backup_exclude similarity index 100% rename from .backup_exclude rename to etc/restic/backup_exclude diff --git a/usr/local/sbin/restic_backup.sh b/usr/local/sbin/restic_backup.sh index d1acb4c..8d65e94 100644 --- a/usr/local/sbin/restic_backup.sh +++ b/usr/local/sbin/restic_backup.sh @@ -23,7 +23,7 @@ RETENTION_YEARS=3 # What to backup, and what to not BACKUP_PATHS="/ /boot /home /mnt/media" -BACKUP_EXCLUDES="--exclude-file /.backup_exclude --exclude-file /mnt/media/.backup_exclude --exclude-file /home/erikw/.backup_exclude" +BACKUP_EXCLUDES="--exclude-file /etc/restic/backup_exclude --exclude-file /mnt/media/.backup_exclude --exclude-file /home/erikw/.backup_exclude" BACKUP_TAG=systemd.timer