Information

ZCB 4.8 and higher supports restore from the command line. These commands can be placed into a batch script for automation purposes.

Command-line and automated restores have certain limitations.

  • ZCB must be installed and require that a valid cloud certificate be imported.
  • Restores via the command line may be restored to the Original Location or to an Alternate Location.
  • All restores via command line are of the most recent backups. You cannot choose a previous restore point.

Additionally, all requirements for restore must be met, as noted in the User's Guide.

Command-line Restores

To restore from the command line, open a command prompt and navigate to the \bin\ folder in your ZCB installation directory.

There are two commands available. One performs a Restore Catalog operation to allow restore of data from a different machine. The other performs the restore itself.

There are no progress bars or other indicators when performing command-line restores of catalogs or data.

Restore Catalogs via Command Line

CloudController.exe --command restorecatalog --restoretype <cloud / local> --updatebackupfolder <1 / 0> --restorelocation <Path> --hostname <localhost / * / HOSTNAME> --backupset <Backupset name / *> --cloudLocation <Location>

This step is not necessary unless data needs to be restored from another machine or if ZCB was just installed on the current machine.

Arguments

The command to restore catalogs accepts a number of arguments that allow some flexibility.

Example commands to restore catalogs

Restore catalogs for all backup sets in all cloud locations for all machines
CloudController.exe --command restoreCatalog --restoretype cloud --updatebackupfolder 1 --restorelocation "C:\My\Catalog\Folder" --hostname * --backupset * --cloudLocation
Restore catalogs for the backup set MyBackup from the SERVER2 machine stored in the Tokyo location
CloudController.exe --command restoreCatalog --restoretype cloud --updatebackupfolder 1 --restorelocation "C:\My\Catalog\Folder" --hostname SERVER2 --backupset MyBackup --cloudLocation ap-northeast-1
Restore catalogs for backup sets MyBackup from the FILESERVER machine stored on local disk in C:\Where\My\Backup\Is\Located
CloudController.exe --command restoreCatalog --restoretype local --updatebackupfolder 1 --restorelocation "C:\Where\My\Backup\Is\Located" --hostname FILESERVER --backupset MyBackup

Restore Data via Command Line

Once catalogs have been restored, or if you have an existing, healthy ZCB installation on the machine, you may restore data from the command line.

To restore to the Original Location

CloudController.exe download "<Hostname+Backupsetname / *>" restore "<Download folder path>"

To restore to an Alternate Location

CloudController.exe download "<Hostname+Backupsetname name / *>" restore "<Download folder path>" "<Restore folder path>"

Arguments

The command to restore data accepts a number of arguments that allow some flexibility.

Example commands to restore data

Restore data for all backup sets to the Original Location and store the backup archive in C:\My\Download\Folder
CloudController.exe download "*" restore "C:\My\Download\Folder"
Restore data for the backup set MyBackups to the Original Location from the FileServer machine and store the backup archive in C:\My\Download\Folder
CloudController.exe download "FileServer+MyBackups" restore "C:\My\Download\Folder"
Restore data for the backup set FileSystem to D:\My\Restore\Folder from the FileServer machine and store the backup archive in C:\My\Download\Folder
CloudController.exe download "FileServer+FileSystem" restore "C:\My\Download\Folder" "D:\My\Restore\Folder"

Automated Restores

Batch files can be created using the above command-line options. These batch files can be run manually to make command-line restores easier, or they can be run automatically with Windows Task Scheduler.

Example batch file

Here is a sample batch file that can be run to restore backups from all backup sets on all machines in all locations.

RestoreAutomation.bat

This file can be edited to support your needs, or you may write your own using the command-line options above.