#!/bin/bash
source "${AGENT_PATH}/_common.sh"
_check_required_env_vars

_stop_container "$CONTAINER_NAME"

if ! autobackup volume=$DATA_VOLUME volume=$CONFIG_VOLUME $1 $2; then
    _die "Failed to create backup"
fi

_start_container "$CONTAINER_NAME"

echo "Backup created successfully: $BACKUP_FILE"
