Virtual Machine Backup On Hyper-V Windows Server Core Edition
Note: these commands are available in Backup for Windows 6.3 and later
The following commands are available:
- list. Lists files or versions backed up to a cloud storage
- addHyperVPlan. Creates a new backup plan for Hyper-V machines to cloud storage
- editHyperVPlan. Edits an existing Hyper-V plan
- listHyperVMachines. Displays a list of local Hyper-V machines
- addRestoreHVPlan. Creates a new plan to restore Hyper-V backups
List Command Parameters
- -a. Account name
- -f(-file). Backup file
- -d(-directory). Backup directory
- -r(-root). Backup storage root
- -p(-prefix). Performs listing with a specified backup prefix
- -hyperV(-hv). Lists backed up Hyper-V virtual machines
- -VMware(-vm). Lists backed up VMware virtual machines
- -output. Output format. Available values: short, full(default)
- -mp. Master password. This parameter must be specified if the application is protected by master password
- -?(?,/?,help,man). Displays help.
Example
list -a "\\Buffalo\share\" -hv
CloudBerry Backup Desktop Edition Command Line Interface started
Connection settings are OK
Hyper-V host HERMES.dev.cbl.corp
Machines:
Windows2008Clean
Hyper-V host QACLUSTER3.QA.local
Machines:
DOS 6.22 (v5.0)
DOS 6.22 (v8.0)
Ubuntu 14 (v.5.0)
Windows Server 2003 (v.5.0)
Windows Server 2012 (v5.0)
Windows Server 2012 (v8.0)
listHyperVMachines Command Parameters
- -output. Output format. Possible values: short, full(default)
- -?(?,/?,help,man). Displays command help
listHyperVMachines -output full
CloudBerry Backup Desktop Edition Command Line Interface started
Name Windows Server 2012
Power State PoweredOff
Name Ubuntu 19.04
Power State PoweredOff
listHyperVMachines -output short
Windows Server 2012
Ubuntu 19.04
addHyperVPlan Command Parameters
To create a Hyper-V backup plan, use the addHyperVPlan command.
Add backup HyperV plan command Help:
addHyperVPlan -n planName <-a accountName | -aid accountID> <-all | -r | {-v machineName}> ] [-ea [AES128-256] -ep password] [-every [day, week, month, dayofmonth]][-at specificDateTime] [-day [1..31]] [-weekday listOfWeekDays] [-weeknumber weeknumber] [-repeatEvery repeatPeriod -repeatStartDate startDate]] [-everyForceFull [day, week, month, dayofmonth]][-atForceFull specificDateTime] [-dayForceFull [1..31]] [-weekdayForceFull listOfWeekDays] [-weeknumberForceFull weeknumber] [-repeatEveryForceFull repeatPeriod -repeatStartDateForceFull startDate]] [-sp [yes | no]] [-df days] [-preAction "command" -pac [yes | no]] [-postAction "command" -paa [yes | no]] [[-notification [errorOnly | on | off]]][-winLog [errorOnly | on | off]][-keepLastVersion [yes | no]][-keep [all | number]][-delayPurge [no | 1d(day) | 1w(week) | 1m(month)]][-purgeByDefault [yes | no]][-purge [no | 1d(day) | 1w(week) | 1m(month)]]
- all. Back up all virtual machines
-r. Back up only running virtual machines
-v. Back up only selected virtual machines.
Example
addHyperVPlan** -aid decd1b88-ad49-4b0d-a620-39c187e7045e -n "HyperV from CLI" -r
editHyperVPlan** -n "HyperV from CLI" -v "Windows 7x64manual" -v "debug VM"
Note that in case you need to list selected virtual machines for backup plan, you have to list with the **-v** parameter separately (i.e.: **-v "Windows7" -v "Server12" -v "Server14"**)
Create a Hyper-V Restore Plan
To create a Hyper-V restore plan, use the addRestoreHVPlan command.
Add restore Hyper-V plan command Help:
addHVRestorePlan -n planName [-cloneplan] <-a accountName | -aid accountID> <-host host name> <-machine machine name> [-ep password] [-every [day, week, month, dayofmonth]][-at specificDateTime] [-day [1..31]] [-weekday listOfWeekDays] [-repeatEvery repeatPeriod -repeatStartDate startDate]] [-rt <LatestVersion | PointInTime> -rpt specificDateTime] [-preAction "command" -pac [yes | no]] [-postAction "command" -paa [yes | no]] -vdf virtualDiskFolder>
-host(-h) Hyper-V host
-machine(-m) Hyper-V machine name