Update source/agent-remote/datacommands_v2.sh
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user