Created
July 2, 2013 14:12
-
-
Save jlizanab/5909641 to your computer and use it in GitHub Desktop.
Create backup of actual directory on dropbox (bash). You can add this feature to your .bash_profile or .bashrc, and call it from a terminal when you need to back up a folder.
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
backupOnDropbox(){ | |
STRNOW=`date +"%Y%m%d%H%M"`; | |
STRNAMEDIR=`basename $PWD`_; | |
STRDESCFILE='_backup.zip'; | |
zip -r $STRNAMEDIR$STRNOW$STRDESCFILE * | |
mv $STRNAMEDIR$STRNOW$STRDESCFILE ~/Dropbox/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment