diff --git a/.talismanrc b/.talismanrc index 53b8870..7006664 100644 --- a/.talismanrc +++ b/.talismanrc @@ -17,6 +17,10 @@ fileignoreconfig: - filename - filename: dotfiles/sudoers.d/protonvpn checksum: 1a86c97a80c2ae3be4d455c4db441d6d2b4d8553784e43646802dd3bf27316ef +- filename: dotfiles/systemd_timers/rsync_backup.service + checksum: 003ac82ffac85609548db7dac407768f47828a725562c0afba4477e3571ecdd3 +- filename: dotfiles/systemd_timers/rsync_backup.timer + checksum: da8a09026e2fc28ce620eefa1a0a697468453c22a7b8640fb11bdda065cddb51 - filename: dotfiles/zsh/zshenv ignore_detectors: - filename @@ -28,3 +32,5 @@ fileignoreconfig: - filename: pacman_hooks/borg_backup.hook ignore_detectors: - filename +- filename: rsync_backup.sh + checksum: 7a1de4a184109ca046dc5aa691d352d40451fc413b997746396faab35158b734 diff --git a/dotfiles/systemd_timers/rsync_backup.service b/dotfiles/systemd_timers/rsync_backup.service new file mode 100644 index 0000000..c2ba3da --- /dev/null +++ b/dotfiles/systemd_timers/rsync_backup.service @@ -0,0 +1,6 @@ +[Unit] +Description=Backup with rsync daily + +[Service] +Type=simple +ExecStart=/bin/bash -c 'source /home/*/setup-cockpit/secrets && /home/*/setup-cockpit/rsync_backup.sh' diff --git a/dotfiles/systemd_timers/rsync_backup.timer b/dotfiles/systemd_timers/rsync_backup.timer new file mode 100644 index 0000000..3ab0555 --- /dev/null +++ b/dotfiles/systemd_timers/rsync_backup.timer @@ -0,0 +1,8 @@ +[Unit] +Description=Backup with rsync daily + +[Timer] +OnCalendar=*-*-* 12:00:00 + +[Install] +WantedBy=timers.target diff --git a/rsync_backup.sh b/rsync_backup.sh new file mode 100755 index 0000000..e5fbc8e --- /dev/null +++ b/rsync_backup.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# 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 --exclude="$RSYNC_EXCLUDES" "$RSYNC_BACKUP_SRC" "$RSYNC_BACKUP_DEST"