Created
July 7, 2014 19:34
-
-
Save AndiH/4dc6230b63750ac4f57b to your computer and use it in GitHub Desktop.
Small script for backing up a folder with rsync (to local Dropbox) and gsync (to Google Drive)
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Backups the local version of my PhD thesis to Dropbox and Google Drive | |
| # Andreas Herten, 2014 | |
| main() { | |
| local baseDir="/Users/Andi/Documents/Studium/Promotion/Thesis/LaTeX" | |
| local logFile="thesis.log" | |
| local gDriveTargetDir="Thesis/Backup/" | |
| local gDriveLogfile=$baseDir/"gsync."$logFile | |
| local dropboxTargetDir="/Users/Andi/Dropbox/Promotion/Thesis" | |
| local dropboxLogfile=$baseDir/"rsync."$logFile | |
| gsync \ | |
| -rlptgov --progress --stats --human-readable --delete --cvs-exclude \ | |
| --log-file=$gDriveLogfile \ | |
| $baseDir \ | |
| drive://$gDriveTargetDir | |
| rsync -az -v --progress --stats --human-readable --delete \ | |
| --log-file=$dropboxLogfile \ | |
| $baseDir \ | |
| $dropboxTargetDir | |
| } | |
| main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment