mirror of
https://github.com/acedanger/shell.git
synced 2025-12-05 22:50:18 -08:00
21 lines
483 B
Bash
Executable File
21 lines
483 B
Bash
Executable File
#! /bin/bash
|
|
|
|
function move-backups() {
|
|
# -q quiet
|
|
# -r recursive
|
|
# -z compress
|
|
rsync -qrz --include '*.gz' --remove-source-files vperanda:/home/acedanger/backup/docker-data
|
|
/mnt/m/backups/
|
|
}
|
|
|
|
if [ "$(expr substr $(uname -s) 1 5)" == 'Linux' ]; then
|
|
move-backups
|
|
fi
|
|
|
|
# send a notification to https://notify.peterwood.rocks/lab
|
|
curl \
|
|
-H priority:default \
|
|
-H tags:backups,${HOSTNAME} \
|
|
-d "The backups have been moved to the NAS." \
|
|
https://notify.peterwood.rocks/lab
|