Created
October 30, 2019 14:06
-
-
Save Dilden/bb460a037bef119c1b5f665a964d3ce1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
THEDATE=`date +%d%m%y%H%M` | |
MEDIA_PATH="/mnt/shared/Media/" | |
LOCAL_BACKUP_PATH="/media/backups/Media/" | |
# Backup shared media | |
rsync -r ${MEDIA_PATH} ${LOCAL_BACKUP_PATH} | |
if [ "$?" -eq "0" ] | |
then | |
echo "Media backup successful \n"; | |
else | |
echo "Media backup failed \n"; | |
fi | |
echo "media backup complete $THEDATE \n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment