'Generic Commit'

This commit is contained in:
Your Name
2025-06-16 22:26:06 +12:00
parent 5c4560b74b
commit f917e8cb4f
15 changed files with 4 additions and 4 deletions

21
simple-object-server/restore.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
source "${AGENT_PATH}/common.sh" || _die "Failed to source common.sh"
_check_required_env_vars "BACKUP_FILE" "TEMP_DIR" "VOLUME_NAME" "CONTAINER_NAME"
# Simple Object Storage Restore Script
# Restores data from a backup file.
echo "Uninstalling service before restore..."
bash ./uninstall.sh || _die "Failed to uninstall service before restore"
echo "Restoring data for ${CONTAINER_NAME} from ${BACKUP_FILE}..."
datarestore "volume=${VOLUME_NAME}" || _die "Failed to restore data from backup file"
echo "Restore complete. Reinstalling service..."
bash ./install.sh || _die "Failed to reinstall service after restore"
echo "Service ${CONTAINER_NAME} restored and reinstalled."