make the volume scripts ignore ephemeral volumes

This commit is contained in:
goldsquid
2026-06-06 09:57:48 +07:00
parent d369f62c44
commit 91ef991773
10 changed files with 61 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
#!/bin/bash
dir="$(dirname "$0")"
source "$dir/volume-utils.sh"
# Path to the backup directory
backup_dir="/backup"
@@ -13,7 +14,7 @@ if [ ! -d "$volume_dir" ]; then
fi
# Read the JSON input and extract the list of keys
keys=$(cat $dir/$1.yml | yaml2json - | jq '.volumes' | jq -r 'keys[]' | grep -E '^["'\'']?[0-9a-z]')
keys=$(get_persistent_volume_keys "$dir/$1.yml" | grep -E '^[0-9a-z]')
restore_files=()
cleanup_folders=()