Automating VMware Consolidated Backups using VCB Automator |
VCB AutomatorVCB Automator utilizes the command line utilities that is found in the VMware Consolidated Backup Framework package in order to automate backing up a configured set of virtual machines to disk - this is used when a specific commercial backup agent is either not wanted or simply does not add enough features to warrant actually purchasing licenses for them.The script is modelled after the Unix-based rsnapshot utility which, in a simplistic way, takes care of performing backups and storing the actual data in a rotating set of directories named daily.0, daily.1 and so on with daily.0 always referencing the newest copy of the data. Installing VCB and VCB AutomatorThe VCB framework along with VCB Automator can be easily installed and configured by performing the following steps:
After installation and configuration the automator can be run via the automate.exe command - use the --help parameter to list recognized options. After performing a few tests this can be scheduled to run as scheduled task from within MS Windows operating systems. Configuring VCB AutomatorThe VCB Automator can be run with a configuration file as a parameter, and by doing so having it define how the application should perform the actual backup. The configuration, see sample configuration below for reference, is based on a well known INI-format, and the most important sections to pay attention to is where to put the backups and how the VCB Framework should authenticate against the VMware Environment.Servers that you want to backup should always follow some basic naming schemes, and is at the moment modelled after the policy at my workplace which defines that all servers should be named after their complete fully qualified domain name. The configured amount of threads indicate how many backup groups can be backed up in parallell - this functionality has been added so that we have the ability to ensure that we don't, for instance, overloading the same storage LUN by performing too many backups in parallell. Another instance where this would be necessary is when we have collections of servers in clusters, and we do not want to impact the systems user experience by backing them up at the same time. Sample configuration.ini
[General]
; General backup settings including where the VCB framework files are located
; as well as where the backup files should be placed.
vcb_bin=C:\Program Files\VMware\VMware Consolidated Backup Framework
backup_dir = C:\Backup ; Where to put the backed up files
threads = 2 ; How many groups can be backed up in parallell
generations = 7 ; How many generations of backups to keep
; Specifications for how we should be connecting to virtual center or an ESX
; host.
vc_host = localhost ; Virtual Center address
vc_user = administrator ; Virtual Center user to connect as
vc_password = ; Virtual Center password
vc_password_skip = yes ; Don't supply a password - password should be set
; in the registry instead. See VCB documentation.
; Options for enabling reports and error messages to be sent to an
; administrator via email.
email_from = vcb@localhost ; From-adress
email_to = vcb@localhost ; To-adress
email_server = localhost ; SMTP Server
email_quiet = yes ; Only send when errors have been logged
email = no ; Send emails from the system
; Group definitions below this point - these can be named anything as long as
; only alphanumeric are used. There's no limit on groups that can be created,
; but mainly these should be used so that we follow the VMware recommandations
; of not backing up data from the same LUN in parallell.
; Group 1 backs up the complete data from VM-1
[Group1]
VM-1=full
; Group 2 here is an example of how we can backup separate parts of
; Windows-based virtual machines, but also that we can both perform a full
; backup as well as only separate parts.
[Group2]
VM-2=full;C:\Backup
VM-3=C:\Backup;D:\Files
|