Skip to content

Instantly share code, notes, and snippets.

@Dilden
Created October 30, 2019 14:06
Show Gist options
  • Save Dilden/bb460a037bef119c1b5f665a964d3ce1 to your computer and use it in GitHub Desktop.
Save Dilden/bb460a037bef119c1b5f665a964d3ce1 to your computer and use it in GitHub Desktop.
#!/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