Merge pull request #19 from toddejohnson/move-exclude-etc
Move /.backup_exlude to /etc/restic/backup_exclude
This commit is contained in:
@@ -1,17 +1,15 @@
|
|||||||
# Not file targets.
|
# Not file targets.
|
||||||
.PHONY: help install install-scripts install-conf install-exclude install-systemd
|
.PHONY: help install install-scripts install-conf install-systemd
|
||||||
|
|
||||||
### Macros ###
|
### Macros ###
|
||||||
SRCS_SCRIPTS = $(filter-out %cron_mail, $(wildcard usr/local/sbin/*))
|
SRCS_SCRIPTS = $(filter-out %cron_mail, $(wildcard usr/local/sbin/*))
|
||||||
SRCS_CONF = $(filter-out %template, $(wildcard etc/restic/*))
|
SRCS_CONF = $(filter-out %template, $(wildcard etc/restic/*))
|
||||||
SRCS_EXCLUDE = .backup_exclude
|
|
||||||
SRCS_SYSTEMD = $(wildcard etc/systemd/system/*)
|
SRCS_SYSTEMD = $(wildcard etc/systemd/system/*)
|
||||||
|
|
||||||
# Just set PREFIX in envionment, like
|
# Just set PREFIX in envionment, like
|
||||||
# $ PREFIX=/tmp/test make
|
# $ PREFIX=/tmp/test make
|
||||||
DEST_SCRIPTS = $(PREFIX)/usr/local/sbin
|
DEST_SCRIPTS = $(PREFIX)/usr/local/sbin
|
||||||
DEST_CONF = $(PREFIX)/etc/restic
|
DEST_CONF = $(PREFIX)/etc/restic
|
||||||
DEST_EXCLUDE = $(PREFIX)/
|
|
||||||
DEST_SYSTEMD = $(PREFIX)/etc/systemd/system
|
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
|
@egrep "#\starget:" [Mm]akefile | sed 's/\s-\s/\t\t\t/' | cut -d " " -f3- | sort -d
|
||||||
|
|
||||||
# target: install - Install all files
|
# 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.
|
# 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 -d $(DEST_CONF)
|
||||||
install -m 0600 $(SRCS_CONF) $(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
|
# target: install-systemd - Install systemd timer and service files
|
||||||
install-systemd:
|
install-systemd:
|
||||||
install -d $(DEST_SYSTEMD)
|
install -d $(DEST_SYSTEMD)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ RETENTION_YEARS=3
|
|||||||
|
|
||||||
# What to backup, and what to not
|
# What to backup, and what to not
|
||||||
BACKUP_PATHS="/ /boot /home /mnt/media"
|
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
|
BACKUP_TAG=systemd.timer
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user