diff options
| author | Jason D. McCormick <jason@mfamily.org> | 2023-12-20 16:47:37 -0500 |
|---|---|---|
| committer | Jason D. McCormick <jason@mfamily.org> | 2023-12-20 16:47:37 -0500 |
| commit | 62bca1b61296ac551574818c5021188913678168 (patch) | |
| tree | 3224e3bdd527bb2f9253c097512ffd319f4caeed /etc | |
| parent | 93f370195a4178aefce312027ad042559dd51a64 (diff) | |
updated mf-backup, add Makefiles
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/Makefile | 14 | ||||
| -rw-r--r-- | etc/mf-backup | 31 |
2 files changed, 45 insertions, 0 deletions
diff --git a/etc/Makefile b/etc/Makefile new file mode 100644 index 0000000..f2d6243 --- /dev/null +++ b/etc/Makefile @@ -0,0 +1,14 @@ +sysconfdir ?= /etc + +ETC_FILES = $(filter-out Makefile , $(wildcard *)) +ETC_INSTALLABLES = $(patsubst %, $(DESTDIR)$(sysconfdir)/%, $(ETC_FILES)) + +INSTALLABLES = $(ETC_INSTALLABLES) + +.PHONY: install +install: $(INSTALLABLES) + +$(DESTDIR)$(sysconfdir)/%: % + install -D -m 0644 $< $@ + + diff --git a/etc/mf-backup b/etc/mf-backup index 6bde9c1..98d6ff5 100644 --- a/etc/mf-backup +++ b/etc/mf-backup @@ -1,2 +1,33 @@ +#!/usr/bin/bash + +# Hostname to be used within the script. By default +# this should be set to $HOSTNAME from the system environment +# but can be overwritten with any other string as long +# as it makes sense to Kopia +X_HOSTNAME=$HOSTNAME + +# Basic directories to be backed up +DIRS_TO_BACKUP="/etc /home /root /usr/local" + +# Backup a MariaDB - Y or y for "yes", anything else no +# Make sure /var/lib/mysql-backup exists and has enough +# space to dump the full database with mysqldump +BACKUP_MARIADB=n + +# Backup a NextCloud instance - Y or y for "yes", anything else no +# Make sure /var/lib/mysql-backup exists and has enough +# space to dump the full database with mysqldump. Also ensure +# that /usr/local/bin/occ exists as a wraper for the PHP OCC interface +# for Nextcloud. Data assumed to be in /data/nextcloud. +# Note that BACKUP_MARIADB has no impact on BACKUP_NEXTCLOUD +BACKUP_NEXTCLOUD=m + +# B2 Key ID and Key for replication to Backblaze B2 B2_KEY_ID= B2_KEY= + +# Kopia Options +KOPIA_OPTS="--disable-color" + +# Kopia bucket prefix --> Bucket name is ${KOPIA_PREFIX}${X_HOSTNAME} +KOPIA_PREFIX="mfamily-bu-" |
