dguerri / LibVirtKvm-scripts

Libvirt/KVM scripts - online forward incremental backup for libvirt/KVM virtual machines
GNU General Public License v3.0
72 stars 25 forks source link

Exit with an error when there are no running domains and -c is used #26

Open dguerri opened 9 years ago

dguerri commented 9 years ago

See #24 In a next release we could think about introducing an additional flag for offline images backup. Having the backup performed always, regardless of the mode specified by the user, could be a bit confusing. Alternatively we could just exit with an error if -c is used.

AJRepo commented 9 years ago

Sure. One question is what to do if someone specifies "-b /directory -c" To me -b indicates that a backup should be done to that directory. Right now, after Merge #25 , if someone specifies -c but not the -b flag on a shut-off domain (or one found from "all") then no backup of the shut-off domain is done, it skips it. We could just say "-b and -c flags can't both be specified at the same time but -b and -C can".

How about instead of an additional flag for offline backup, a "state" flag which indicates the state of the VMs to backup. The default could be "any" or running" If no running domains are found it could state that no running domains were found and suggest something like "try --state=any or --state=shut-off "