diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/borg.sh | 7 | ||||
-rw-r--r-- | backends/bup.sh | 5 | ||||
-rw-r--r-- | backends/tar.sh | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/backends/borg.sh b/backends/borg.sh index 999067f..f5930c8 100644 --- a/backends/borg.sh +++ b/backends/borg.sh @@ -56,17 +56,18 @@ function borg_create_backup() { return $RETCODE } -function borg_ls_remote() { +# server_restore relies on output format of this function +function borg_ls_dir() { export BORG_PASSCOMMAND="$BACKUP_PASSCOMMAND" borg list "$1" | cut -d' ' -f1 } -function borg_ls() { +function borg_ls_all() { export BORG_PASSCOMMAND="$BACKUP_PASSCOMMAND" for BACKUP_DIR in ${BACKUP_DIRS[*]} do echo "borg: backups in \"$BACKUP_DIR\":" - borg list "$BACKUP_DIR" + borg list "$BACKUP_DIR" | cut -d' ' -f1 done } diff --git a/backends/bup.sh b/backends/bup.sh index ab27825..a5ddb14 100644 --- a/backends/bup.sh +++ b/backends/bup.sh @@ -54,11 +54,12 @@ function bup_create_backup() { return $RETCODE } -function bup_ls_remote() { +# server_restore relies on output format of this function +function bup_ls_dir() { bup -d "$(bup_local)" ls -r "$BACKUP_DIR" "$BACKUP_NAME" } -function bup_ls() { +function bup_ls_all() { for BACKUP_DIR in ${BACKUP_DIRS[*]} do echo "bup: backups in \"$BACKUP_DIR\":" diff --git a/backends/tar.sh b/backends/tar.sh index b556798..1265992 100644 --- a/backends/tar.sh +++ b/backends/tar.sh @@ -40,7 +40,8 @@ function tar_create_backup() { return $RETCODE } -function tar_ls_remote() { +# server_restore relies on output format of this function +function tar_ls_dir() { BACKUP_DIR="$1" if [[ $BACKUP_DIR == *:* ]]; then REMOTE="$(echo "$BACKUP_DIR" | cut -d: -f1)" @@ -51,7 +52,7 @@ function tar_ls_remote() { fi } -function tar_ls() { +function tar_ls_all() { for BACKUP_DIR in ${BACKUP_DIRS[*]} do echo "Backups in $BACKUP_DIR:" |