backup de todas as zonas no SmartOS
#!/bin/bash# based on http://blog.beulink.org/smartos-migrate-backup-and-restore-kvm-vms/ALIASES=($(vmadm list -o alias | awk ‘{if(NR>1)print}’))UUIDS=($(vmadm list -o uuid | awk ‘{if(NR>1)print}’))BACKUP_PATH=/zones/backupfor i in “${!UUIDS[@]}”do UUID=${UUIDS[$i]} ALIAS=${ALIASES[$i]} LABEL=${ALIAS}_${UUID} echo “backup ${LABEL}” vmadm get ${UUID} | json …
Continuar lendo