diff --git a/.gitignore b/.gitignore index efefedf..0eeb430 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ __pycache__/ process_list.txt secrets repos.yml +rsync_backup_excludes diff --git a/.talismanrc b/.talismanrc index 9ccb1f2..d7d6b72 100644 --- a/.talismanrc +++ b/.talismanrc @@ -33,4 +33,4 @@ fileignoreconfig: ignore_detectors: - filename - filename: rsync_backup.sh - checksum: b88ac0e625674d23d35feb26ce09c7a13a382aeffd046a99f28aca56c046775a + checksum: d5168deb0ddc19195ac9231e1e4103d83c76c44bbcdf3eccb1bb5255c75361d8 diff --git a/configs.yml b/configs.yml index 926f9d2..b816e1a 100644 --- a/configs.yml +++ b/configs.yml @@ -437,6 +437,9 @@ rsync_backup: - sudo ln -rsi dotfiles/systemd_timers/rsync_backup.service /etc/systemd/system/rsync_backup.service - run: - sudo systemctl enable rsync_backup.timer + - symlink: + - ~/src/secrets/setup-cockpit/rsync_backup_excludes + - ~/setup-cockpit/rsync_backup_excludes latex: - install: diff --git a/rsync_backup.sh b/rsync_backup.sh index 3ae3625..7fef6fe 100755 --- a/rsync_backup.sh +++ b/rsync_backup.sh @@ -3,4 +3,6 @@ # Backup script that uses rsync, taken from https://wiki.archlinux.org/index.php/Rsync#As_a_backup_utility # This script should be run daily with cron or a systemd timer. -rsync -a --delete --quiet "${RSYNC_EXCLUDES[@]/#/--exclude=}" "$RSYNC_BACKUP_SRC" "$RSYNC_BACKUP_DEST" +echo "$RSYNC_BACKUP_SRC" +echo "$RSYNC_BACKUP_DEST" +rsync --dry-run -va --delete --quiet --exclude-from=/home/*/setup-cockpit/rsync_backup_excludes "$RSYNC_BACKUP_SRC" "$RSYNC_BACKUP_DEST" diff --git a/secrets.template b/secrets.template index d4cd23d..91c39ec 100644 --- a/secrets.template +++ b/secrets.template @@ -10,8 +10,6 @@ export RSYNC_BACKUP_SRC=/home export RSYNC_BACKUP_DEST=/path/to/backup/destination -export RSYNC_EXCLUDES=("pattern","other_pattern") - export BORG_REPO='user@ho.st' export BORG_PASSPHRASE='passphrase'