bak: configure backups

This commit is contained in:
thomasabishop 2024-03-10 17:59:18 +00:00
parent 04e81897cf
commit b1f60aeda7
6 changed files with 38 additions and 1 deletions

9
backups/cron/daily.sh Executable file
View file

@ -0,0 +1,9 @@
sudo /usr/bin/rsnapshot daily
sudo chown -R thomas:thomas /mnt/backups
if [ $? -eq 0 ]; then
/usr/bin/notify-send 'Backup' 'Daily backup completed successfully'
else
/usr/bin/notify-send 'Backup' 'Daily backup failed'
fi

9
backups/cron/hourly.sh Executable file
View file

@ -0,0 +1,9 @@
sudo /usr/bin/rsnapshot hourly
sudo chown -R thomas:thomas /mnt/backups
if [ $? -eq 0 ]; then
/usr/bin/notify-send 'Backup' 'Hourly backup completed successfully'
else
/usr/bin/notify-send 'Backup' 'Hourly backup failed'
fi

9
backups/cron/monthly.sh Executable file
View file

@ -0,0 +1,9 @@
sudo /usr/bin/rsnapshot monthly
sudo chown -R thomas:thomas /mnt/backups
if [ $? -eq 0 ]; then
/usr/bin/notify-send 'Backup' 'Monthly backup completed successfully'
else
/usr/bin/notify-send 'Backup' 'Monthly backup failed'
fi

9
backups/cron/weekly.sh Executable file
View file

@ -0,0 +1,9 @@
sudo /usr/bin/rsnapshot weekly
sudo chown -R thomas:thomas /mnt/backups
if [ $? -eq 0 ]; then
/usr/bin/notify-send 'Backup' 'Weekly backup completed successfully'
else
/usr/bin/notify-send 'Backup' 'Weekly backup failed'
fi

View file

@ -21,7 +21,7 @@ config_version 1.2
# All snapshots will be stored under this root directory.
#
snapshot_root /run/media/thomas/archbish_snaps
snapshot_root /mnt/backups
# If no_create_root is enabled, rsnapshot will not automatically create the
# snapshot_root directory. This is particularly useful if you are backing
# up to removable media, such as a FireWire or USB drive.

View file

@ -21,6 +21,7 @@ plugins=(git npm fzf-tab zsh-autosuggestions zsh-syntax-highlighting)
# User configuration
export EDITOR='nvim'
source ~/dotfiles/.env
source $ZSH/oh-my-zsh.sh