Advertisement
hjaltiatla

rclone-sync

Nov 13th, 2019
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. #Script to sync important folders from workstation to Google Drive
  3. #https://rclone.org/commands/rclone_sync/
  4. #How can I fully log all bash scripts actions - https://serverfault.com/questions/103501/how-can-i-fully-log-all-bash-scripts-actions
  5. exec 3>&1 4>&2
  6. trap 'exec 2>&4 1>&3' 0 1 2 3
  7. exec 1>>/home/hjalti/bin/log.out 2>&1
  8. echo $(date)
  9. echo "sync my scripts folder to Google Drive folder ubu-backup"
  10. rclone sync /home/hjalti/my-Scripts Google-Drive:ubu-backup/my-Scripts
  11. echo "sync Documents folder to Google Drive folder ubu-backup"
  12. rclone sync /home/hjalti/Documents Google-Drive:ubu-backup/Documents
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement