aboutsummaryrefslogtreecommitdiff
path: root/backends/borg.sh
diff options
context:
space:
mode:
authorGravatar TheMightyV <themightyv@protonmail.com> 2022-01-02 21:18:02 +0100
committerGravatar TheMightyV <themightyv@protonmail.com> 2022-01-02 21:18:02 +0100
commit8974233a537d2890d75d398bdbdf5ca73152b23b (patch)
treea6af6f42786c9a9ce590da798f000f8001246318 /backends/borg.sh
parent023a18b1d150fc9c09bf6ac135663f7ddce3b757 (diff)
downloadminecraft-server-tools-8974233a537d2890d75d398bdbdf5ca73152b23b.tar.gz
moved from dmenu to bash select, minor cosmetics
Diffstat (limited to 'backends/borg.sh')
-rw-r--r--backends/borg.sh7
1 files changed, 4 insertions, 3 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
}