Dropshell basic templates (WIP)
This commit is contained in:
17
caddy/restore.sh
Normal file
17
caddy/restore.sh
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
_check_required_env_vars
|
||||
|
||||
# RESTORE SCRIPT
|
||||
|
||||
|
||||
# uninstall container before restore
|
||||
bash ./uninstall.sh || _die "Failed to uninstall service before restore"
|
||||
|
||||
# restore data from backup file
|
||||
autorestore "$1" "$2" "volume=$DATA_VOLUME" "volume=$CONFIG_VOLUME" || _die "Failed to restore data from backup file"
|
||||
|
||||
# reinstall service
|
||||
bash ./install.sh || _die "Failed to reinstall service after restore"
|
||||
|
||||
echo "Restore complete! Service is running again."
|
Reference in New Issue
Block a user