Update caddy/config/caddyfile/check_caddyfile.sh
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
This commit is contained in:
21
scrutiny/backup.sh
Executable file
21
scrutiny/backup.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC1091
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "${SCRIPT_DIR}/_volumes.sh"
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME" "BACKUP_FILE" "TEMP_DIR"
|
||||
|
||||
echo "Backing up ${CONTAINER_NAME}..."
|
||||
|
||||
# Stop container for consistent backup
|
||||
_stop_container "$CONTAINER_NAME"
|
||||
|
||||
# Backup volumes
|
||||
# shellcheck disable=SC2046
|
||||
backup_items $(get_scrutiny_volumes) || _die "Failed to create backup"
|
||||
|
||||
# Restart container
|
||||
_start_container "$CONTAINER_NAME"
|
||||
|
||||
echo "Backup created successfully: $BACKUP_FILE"
|
||||
Reference in New Issue
Block a user