Files
j 70dab12114
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 9s
docs: Add 16, update 2 and remove 2 files
2026-01-26 21:17:15 +13:00

22 lines
652 B
Bash
Executable File

#!/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 SCRIPT
# Creates a backup of all Graylog data volumes
# Stop containers before backup
docker compose -p "${CONTAINER_NAME}" stop || _die "Failed to stop Graylog stack"
# Backup all volumes
# shellcheck disable=SC2046
backup_items $(get_graylog_volumes) || _die "Failed to create backup"
# Restart containers
docker compose -p "${CONTAINER_NAME}" start || _die "Failed to restart Graylog stack"
echo "Backup created successfully"