forked from coop-cloud/vaultwarden
add backup capability
This commit is contained in:
parent
bf75cde0b5
commit
7baac51174
31
abra.sh
31
abra.sh
|
@ -1 +1,32 @@
|
|||
<<<<<<< HEAD
|
||||
export APP_ENTRYPOINT_VERSION=v1
|
||||
||||||| parent of 87367d9 (add backup capability)
|
||||
=======
|
||||
APP_DIR="app:/data"
|
||||
|
||||
_backup_app() {
|
||||
# Copied _abra_backup_dir to make UX better on restore and backup
|
||||
{
|
||||
abra__src_="$1"
|
||||
abra__dst_="-"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2154
|
||||
FILENAME="$(basename "$1").tar"
|
||||
|
||||
debug "Copying '$1' to '$FILENAME'"
|
||||
|
||||
silence
|
||||
mkdir -p /tmp/abra
|
||||
sub_app_cp > /tmp/abra/$FILENAME
|
||||
unsilence
|
||||
}
|
||||
|
||||
abra_backup_app() {
|
||||
# shellcheck disable=SC2154
|
||||
ARK_FILENAME="$ABRA_BACKUP_DIR/${abra__app_}_app_$(date +%F).tar.gz"
|
||||
# Cant be FILENAME as that gets changed by something
|
||||
_backup_app $APP_DIR
|
||||
success "Backed up 'app' to $ARK_FILENAME"
|
||||
}
|
||||
>>>>>>> 87367d9 (add backup capability)
|
||||
|
|
Loading…
Reference in New Issue