From def90b4647b2e9b87cdb820f5cb200051c3b3de2 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 10 Dec 2013 12:06:50 +0100 Subject: Added functions for info on backing up and backing up folders with rsync (not optimized for usage over ssh) --- .zsh.after/functions.zsh | 15 +++++++++++++-- 1 file 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 > -- cgit v1.2.3-70-g09d2