Tuesday 10 June 2014

Creating and manipulating Avamar datasets

Datasets must be created in the Avamar GUI (or at least I cannot figure out how to create them in the CLI). 

Once created you can add mass exclusions via the CLI with the script below. The script adds exclusions for the WINDOWS FILE SYSTEM. You can change this by adjusting the plugin to match your required dataset.

Copy the mccli dataset..... line as much as you like changing the --exclude="**\" section to match the folders/files you wish to exclude from your data set.

---- SNIP HERE ----

#!/bin/bash

EXPECTED_ARGS=2
E_BADARGS=65

if [ $# -ne $EXPECTED_ARGS ]
then
  echo "Usage: `basename $0` <domain name> <dataset name>"
  exit $E_BADARGS
fi

mccli dataset add-exclude --domain=$1 --exclude="**\path\filename*.dat" --name="$2" --plugin=3001
mccli dataset add-exclude --domain=$1 --exclude="**\parth\subpath\*" --name="$2" --plugin=3001

---- SNIP HERE ----

Save above as whatever.sh and make the file executable via "chmod 755 whatever.sh" to make it executable. 

Run the command "./whatever.sh DOMAIN MYDATASET"

Sit back and relax as your exclusions are created! this is great when you are rolling out a default exclusion set across multiple Avamar nodes.

1 comment: