From de4fc74d50d536f524aa4c65e270123bfe8ef893 Mon Sep 17 00:00:00 2001 From: TheMightyV Date: Sun, 2 Jan 2022 20:12:27 +0100 Subject: added backup restoration --- backends/bup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backends/bup.sh') diff --git a/backends/bup.sh b/backends/bup.sh index e51aaf1..ab27825 100644 --- a/backends/bup.sh +++ b/backends/bup.sh @@ -54,6 +54,10 @@ function bup_create_backup() { return $RETCODE } +function bup_ls_remote() { + bup -d "$(bup_local)" ls -r "$BACKUP_DIR" "$BACKUP_NAME" +} + function bup_ls() { for BACKUP_DIR in ${BACKUP_DIRS[*]} do @@ -61,3 +65,10 @@ function bup_ls() { bup -d "$(bup_local)" ls -r "$BACKUP_DIR" --human-readable -l "$BACKUP_NAME" done } + +function bup_restore() { + REMOTE="$1" + SNAPSHOT="$2" + + bup -d "$(bup_local)" restore -r "$REMOTE" "$BACKUP_NAME/$SNAPSHOT/$PWD/." +} -- cgit v1.2.3