diff options
author | David Runge <david.runge@frqrec.com> | 2013-12-10 12:06:50 +0100 |
---|---|---|
committer | David Runge <david.runge@frqrec.com> | 2013-12-10 12:06:50 +0100 |
commit | def90b4647b2e9b87cdb820f5cb200051c3b3de2 (patch) | |
tree | f5f7aaaee178e12d221d16c0742e23e0c6621a04 | |
parent | f0f776b4616aed436a2d3ee57a1ee88d3455517a (diff) | |
download | dotfiles-def90b4647b2e9b87cdb820f5cb200051c3b3de2.tar.gz dotfiles-def90b4647b2e9b87cdb820f5cb200051c3b3de2.tar.bz2 dotfiles-def90b4647b2e9b87cdb820f5cb200051c3b3de2.tar.xz dotfiles-def90b4647b2e9b87cdb820f5cb200051c3b3de2.zip |
Added functions for info on backing up and backing up folders with rsync (not optimized for usage over ssh)
-rw-r--r-- | .zsh.after/functions.zsh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh index bc68398..80382d3 100644 --- a/.zsh.after/functions.zsh +++ b/.zsh.after/functions.zsh @@ -234,8 +234,7 @@ function lopen () { } function lclose () { - mountpoint /mnt/$1 - notmounted=$($?) + notmounted=$(mountpoint /mnt/$1) echo $notmounted if [[ $notmounted != 0 ]] ; then sudo umount /mnt/$1 @@ -243,4 +242,16 @@ function lclose () { fi } +## RSYNC + +function backupinfo () { + rsync -r -n -t -p -o -g -v --progress --delete --ignore-existing --size-only -s --exclude lost+found $1 $2 + echo "rsync -r -n -t -p -o -g -v --progress --delete --ignore-existing --size-only -s --exclude lost+found /path/to/folder/ /path/to/other/folder" +} + +function backupfolder () { + rsync -r -t -p -o -g -v --progress --delete --ignore-existing --size-only -s --exclude lost+found $1 $2 +} + + # FUNCTIONS > |