Update source/agent-remote/datacommands_v2.sh
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 35s
Build-Test-Publish / build (linux/arm64) (push) Successful in 59s

This commit is contained in:
Your Name
2025-08-30 18:06:15 +12:00
parent d04beefb42
commit 642fbaaae8

View File

@@ -319,6 +319,62 @@ restore_volume() {
# MAIN BACKUP/RESTORE ORCHESTRATION
# ============================================================================
# Process multiple items for creation
# Usage: create_items type1:label1:location1 type2:label2:location2 ...
create_items() {
echo "Starting create operations"
# Process each item
for item in "$@"; do
IFS=':' read -r type label location <<< "$item"
case "$type" in
file)
create_file "$label" "$location"
;;
path)
create_path "$label" "$location"
;;
volume)
create_volume "$label" "$location"
;;
*)
echo "Unknown type: $type (must be file, path, or volume)"
;;
esac
done
echo "Create operations completed"
}
# Process multiple items for destruction
# Usage: destroy_items type1:label1:location1 type2:label2:location2 ...
destroy_items() {
echo "Starting destroy operations"
# Process each item
for item in "$@"; do
IFS=':' read -r type label location <<< "$item"
case "$type" in
file)
destroy_file "$label" "$location"
;;
path)
destroy_path "$label" "$location"
;;
volume)
destroy_volume "$label" "$location"
;;
*)
echo "Unknown type: $type (must be file, path, or volume)"
;;
esac
done
echo "Destroy operations completed"
}
# Process multiple items for backup
# Usage: backup_items type1:label1:location1 type2:label2:location2 ...
backup_items() {