forked from priyadarsh/dev-env-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-backup.sh
executable file
·23 lines (18 loc) · 850 Bytes
/
install-backup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
##backing up
## mkdir to mount WD
#mkdir /media/wd
## add to /etc/fstab
#//192.168.31.147/WDTVLiveHub /home/hk/wd cifs username=guest,password=,nounix,rw,iocharset=utf8,file_mode=0777,dir_mode=0777,workgroup=WORKGROUP,vers=1.0 0 0
## manual
#sudo mount -t cifs //192.168.31.147/WDTVLiveHub /home/hk/wd -o user=,password=,workgroup=WORKGROUP,rw,iocharset=utf8,file_mode=0777,dir_mode=0777,vers=1.0
##install rclone
curl https://rclone.org/install.sh | sudo bash
#rclone config
## move from gdrive to safe local drive every day at 9 AM
## rclone sync source dest
# rclone copy gdrive: ~/work/safe/googledrive/
## copy from safe local drive to WD every day at 9.05 AM
# sudo rclone copy ~/work/safe /home/hk/wd/backup/hk
## crontab
0 10 * * * rclone copy gdrive: ~/work/safe/googledrive/
#5 10 * * * rclone copy ~/work/safe /home/hk/wd/backup/hk