diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh b/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh index e8b37696..728dc28f 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-data-vol.sh @@ -45,14 +45,10 @@ if [[ $check != 1 ]] ; then fi echo -e "======= Time started : `date`" -echo -e "================================================================================" -echo -e "======= Time: `date`" echo -e "rsync -avr --delete --exclude=Downloads/ --exclude='Data/Docker/sysctl.io/' root@nuc-docker01:/Storage/Data/ /mnt/$drive1/Data/" rsync -avr --delete --exclude=Downloads/ --exclude='Data/Docker/sysctl.io/' root@nuc-docker01:/Storage/Data/ /mnt/$drive1/Data/ -echo -e "======= Time: `date`" echo -e "======= Time complete: `date`" - echo "Sending completion message" payload="{\"message\": \"Data Vol Backup completed\nDate: `date`\n`df -h | grep sda`\n`df -h | grep sdb`\n`df -h | grep sdc`\", \"priority\": 2,\"title\": \"backups-rpi4: Data Vol Backup Complete\"}" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload" diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-media.sh b/nixos/hosts/backups-rpi4/scripts/rsync-media.sh index dfa47900..7cf977fa 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-media.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-media.sh @@ -48,75 +48,59 @@ echo -e "======= Time started : `date`" echo -e "rsync -avr --delete --exclude=luks.img /Storage/Backups/Manual/Computers/ /mnt/$drive1/Backups/Manual/Computers/" rsync -avr --delete --exclude=luks.img root@nuc-docker01:/Storage/Backups/Manual/Computers/ /mnt/$drive1/Backups/Manual/Computers/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Backups/Backblaze/ /mnt/$drive1/Backups/Backblaze/" rsync -avr --delete root@nuc-docker01:/Storage/Backups/Backblaze/ /mnt/$drive1/Backups/Backblaze/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Backups/Logs/ /mnt/$drive1/Backups/Logs/" rsync -avr --delete root@nuc-docker01:/Storage/Backups/Logs/ /mnt/$drive1/Backups/Logs/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Backups/Docker/ /mnt/$drive1/Backups/Docker/" rsync -avr --delete root@nuc-docker01:/Storage/Backups/Docker/ /mnt/$drive1/Backups/Docker/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/Pictures/ /mnt/$drive1/Pictures/" rsync -avr --delete root@nuc-docker01:/Storage/Media/Pictures/ /mnt/$drive1/Pictures/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/Books/ /mnt/$drive1/Books/" rsync -avr --delete root@nuc-docker01:/Storage/Media/Books/ /mnt/$drive1/Books/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/Music/ /mnt/$drive1/Music/" rsync -avr --delete root@nuc-docker01:/Storage/Media/Music/ /mnt/$drive1/Music/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete --exclude=Downloads/ /Storage/Data/ /mnt/$drive1/Data/" rsync -avr --delete --exclude=Downloads/ --exclude=Docker/sysctl* root@nuc-docker01:/Storage/Data/ /mnt/$drive1/Data/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/Movies/ /mnt/$drive2/Movies/" rsync -avr --delete root@nuc-docker01:/Storage/Media/Movies/ /mnt/$drive2/Movies/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[0-9]* /mnt/$drive1/TV_Shows/" rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[0-9]* /mnt/$drive1/TV_Shows/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[A-K]* /mnt/$drive1/TV_Shows/" rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[A-E]* /mnt/$drive1/TV_Shows/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[L-R]* /mnt/$drive2/TV_Shows/" rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[F-R]* /mnt/$drive2/TV_Shows/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[S-Z]* /mnt/$drive3/TV_Shows/" rsync -avr --delete root@nuc-docker01:/Storage/Media/TV_Shows/[S-Z]* /mnt/$drive3/TV_Shows/ -echo -e "================================================================================" echo -e "======= Time: `date`" echo -e "rsync -avr --delete root@nuc-docker01:/Storage/Media/YouTube /mnt/$drive3/YouTube/" rsync -avr --delete root@nuc-docker01:/Storage/Media/YouTube/ /mnt/$drive3/YouTube/ -echo -e "================================================================================" -echo -e "======= Time: `date`" echo -e "======= Time complete: `date`" - echo "Sending completion message" payload="{\"message\": \"$BACKUP_NAME Backup completed\nDate: `date`\n`df -h | grep sda`\n`df -h | grep sdb`\n`df -h | grep sdc`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Complete\"}" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload" diff --git a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh index 55f2a0c1..483e8a89 100644 --- a/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh +++ b/nixos/hosts/backups-rpi4/scripts/rsync-sysctl.sh @@ -36,14 +36,10 @@ fi # Start the backups echo -e "======= Time started : `date`" -echo -e "================================================================================" -echo -e "======= Time: `date`" echo -e "rsync -avr --delete --exclude=Downloads/ root@framework-server:/Storage/Data/Docker/sysctl.io/ /mnt/$drive1/Data/Docker/sysctl.io/" rsync -avr --delete --exclude=Downloads/ root@framework-server:/Storage/Data/Docker/sysctl.io/ /mnt/$drive1/Data/Docker/sysctl.io/ -echo -e "======= Time: `date`" echo -e "======= Time complete: `date`" - echo "Sending completion message" payload="{\"message\": \"$BACKUP_NAME Backup completed\nDate: `date`\n`df -h | grep sda`\n`df -h | grep sdb`\n`df -h | grep sdc`\", \"priority\": 2,\"title\": \"japan-rpi4: $BACKUP_NAME Backup Complete\"}" curl -X "POST" "https://gotify.sysctl.io/message" -H "accept: application/json" -H "Content-Type: application/json" -H "X-Gotify-Key: $GOTIFY_TOKEN" -d "$payload"