The CoBMR configuration utility (cobmrcfg) can be triggered pre Cohesity backup, to run automatically before the backup runs. Generating a fresh configuration makes sure the file is up to date and takes account of any changes to disks/OS patches/hardware etc.
The pre-script is required to run before each backup otherwise you may not get a successful DR recovery.
There are two stages required for setup: A script on the source and enabling the pre-script option in the protection job on the Cohesity Console
First create the script; .bat for Windows & .sh for Linux. Basic examples are shown below:
Windows
@cd "%ProgramFiles%\Cristie\CoBMR" && cobmrcfg.exe
Save as ‘cristieCoBMR.bat’ and place in ‘c:\program files\cohesity\user_scripts’
Linux
Depending on the type of backups being run on Cohesity, either block-based or file-based, the pre-script commands are different.
First, find the $PATH variable for your system, to do this type '$PATH
e.g.
Copy the path into the script (see below)
File-based Linux Cohesity backup
#!/bin/bash
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin:
cobmrcfg
Save as ‘cristieCoBMR.sh’ and place in /opt/cohesity/agent/software/crux/bin/user_script/
Block-based Linux Cohesity backup
#!/bin/bash
SHELL=/bin/bash
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin:
cobmrcfg --cobmr_boot_backup
See here for details of why we need the extra flag with block-based backups: CoBMR Linux when backing up with Cohesity Block-based backups
Save as ‘cristieCoBMR.sh’ and place in /opt/cohesity/agent/software/crux/bin/user_script/
On the Cohesity Console enable and modify the protection job Additional Settings, pre & post scripts, Pre Script to include the script name only e.g.
Windows
Linux
Increase the timeout if required. Due to the nature of Windows systems this can take some time to complete, especially if the system has lots of disks.
When deploying through the Cristie Virtual Appliance (VA), these scripts are placed in the correct folders automatically on install. Just enter the name of script in the Cohesity Protection job.
Default script names when deployed with the Cristie VA are:
Windows: cristieCoBMR.ba
Linux: cristieCoBMR.sh