From 0d6fea078c7b44c52aa233f38d18d94d3d6cddd8 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 13 Aug 2021 00:30:43 +0200 Subject: [PATCH] Add backup/restore --- abra.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/abra.sh b/abra.sh index 3564c8e..58c62ab 100644 --- a/abra.sh +++ b/abra.sh @@ -1,3 +1,23 @@ export INSTALL_SH_VERSION=v7 export CONFIG_JSON_VERSION=v6 export CONFIG_OWNER_JSON_VERSION=v3 + +abra_backup_app() { + _abra_backup_dir "app:/home/node/.wiki" +} + +abra_restore_app() { + # shellcheck disable=SC2034 + { + abra__src_="-" + abra__dst_="app:/home/node/.wiki" + } + + zcat "$@" | sub_app_cp + + success "Restored 'app'" +} + +abra_backup() { + abra_backup_app +}