Added DuP - duplicity wrapper for easy backups
authorHarvie <tomas@mudrunka.cz>
Wed, 15 Jun 2011 16:14:36 +0000 (18:14 +0200)
committerHarvie <tomas@mudrunka.cz>
Wed, 15 Jun 2011 16:14:36 +0000 (18:14 +0200)
bash/dup.sh [new file with mode: 0755]

diff --git a/bash/dup.sh b/bash/dup.sh
new file mode 100755 (executable)
index 0000000..664b0c0
--- /dev/null
@@ -0,0 +1,48 @@
+CONF=.dup.conf
+[ -f "$CONF" ] && eval "$(cat "$CONF")" || { echo no "$CONF"; exit 23; }
+export PASSPHRASE="$DUPLICITY_PASSPHRASE";
+
+DUPLICITY_SOURCE="./"
+DUPLICITY=duplicity
+#BACKUP_TARGET="file:///tmp/bkp"
+
+case "$1" in
+       backup)
+               "$DUPLICITY" $DFLAGS "$DUPLICITY_SOURCE" "$DUPLICITY_TARGET";;
+       full)
+               "$DUPLICITY" full $DUPLICITY_FLAGS "$DUPLICITY_SOURCE" "$DUPLICITY_TARGET";;
+       verify)
+               "$DUPLICITY" verify $DUPLICITY_FLAGS "$DUPLICITY_TARGET" "$DUPLICITY_SOURCE";;
+       list)
+               "$DUPLICITY" list-current-files "$DUPLICITY_TARGET";;
+       status)
+               "$DUPLICITY" collection-status "$DUPLICITY_TARGET";;
+       cleanup)
+               "$DUPLICITY" cleanup --force "$DUPLICITY_TARGET";;
+       restore)
+               echo    you can restore your files using this command:
+               echo    "PASSPHRASE='$PASSPHRASE' '$DUPLICITY' restore '$DUPLICITY_TARGET' /tmp/restored";;
+       man)
+               man duplicity;;
+       *|help)
+               echo "
+       ###################################################################
+       #
+       #  $0 for backing-up using duplicity
+       #  --> http://duplicity.nongnu.org/
+       #
+       #       $0          -   same as '$0 help'
+       #       $0 backup   -   backup (full or incremental)
+       #       $0 full     -   full backup
+       #       $0 verify   -   compare local files with backup
+       #       $0 list     -   list files on backup
+       #       $0 status   -   print backup status
+       #       $0 cleanup  -   remove extraneous files from backup
+       #       $0 restore  -   print command to restore files
+       #       $0 help     -   print this help
+       #       $0 man      -   show duplicity manpage
+       #
+";;
+esac
+
+export PASSPHRASE=''
This page took 0.104207 seconds and 4 git commands to generate.