myhome/.local/bin/backupSynology

19 lines
916 B
Plaintext
Raw Normal View History

#!/bin/bash
source ~/.password
mkdir -p ~/Movies/{Anime,Videos}
mkdir -p ~/Music
mkdir -p ~/Collage
#sudo mount -t cifs //192.168.0.220/Mega -o username=${USERNAME},password=${PASSWORD},vers=2\.0 /mnt/Synology
#sudo mount -t cifs //192.168.0.220/music -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Music
#sudo mount -t cifs //192.168.0.220/usbshare1/Video -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Movies/Videos
#sudo mount -t cifs //192.168.0.220/usbshare1/Anime -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Movies/Anime
#sudo mount -t cifs //192.168.0.220/Studia -o username=${USERNAME},password=${PASSWORD},vers=2\.0 ~/Collage
if [ -e /mnt/Synology/Systems ]
then
echo "Starting $(date)" > ~/.cache/.logSynology
sudo rsync -r --bwlimit=1024 --update --progress /usr/mega/ /mnt/Synology >> ~/.cache/.logSynology
echo "Ending $(date)" >> ~/.cache/.logSynology
fi