aboutsummaryrefslogtreecommitdiff
path: root/backends/bup.sh
diff options
context:
space:
mode:
authorGravatar TheMightyV <themightyv@protonmail.com> 2022-01-02 20:12:27 +0100
committerGravatar TheMightyV <themightyv@protonmail.com> 2022-01-02 20:12:27 +0100
commitde4fc74d50d536f524aa4c65e270123bfe8ef893 (patch)
tree977cda9219a434d5d4f8618fc7accde7cb7ef7d3 /backends/bup.sh
parent4baf9150016177582dd56a1bf3c09a3cad5aa050 (diff)
downloadminecraft-server-tools-de4fc74d50d536f524aa4c65e270123bfe8ef893.tar.gz
added backup restoration
Diffstat (limited to 'backends/bup.sh')
-rw-r--r--backends/bup.sh11
1 files changed, 11 insertions, 0 deletions
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/."
+}