mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 00:00:13 -08:00
shell script to move files from vperanda to NAS. sends notification when complete. expected that this will run on WSL
This commit is contained in:
16
move-backups.sh
Executable file
16
move-backups.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
function move-backups() {
|
||||||
|
rsync -vrzPh --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
|
||||||
Reference in New Issue
Block a user