bseltz-cohesity / scripts

Cohesity REST API examples in PowerShell and Python
Apache License 2.0
103 stars 41 forks source link

backup specific folders #87

Closed geoffaskam closed 1 year ago

geoffaskam commented 1 year ago

Hi, is there a way of backing specific folders (or via wildcard) in a protection group in backupNow or equivalent?

for example a protection group maybe set to backup /disk, within /disk are various sub-folders so would it be feasible to, on occasion, backup / archive some of these but not all. A bit like a restore of specific files?

e.g. backupNow.py -v cluster name -u userid -j 'Protection Job' -f 'docs scans' -w

where -f might be a flag to specify files and folders?

bseltz-cohesity commented 1 year ago

Yes. In the doc https://docs.cohesity.com/6_6/Web/UserGuide/Content/Dashboard/Protection/JobServerPhysical_FileBased.htm#ProtectaPhysicalServerFilebased search for "directive". You can specify a directive file, which contains the paths you want to include in the backup. You can then populate a directive file on the protected server and then call backupNow, specifying the path to the directive file for this backup. Look for the metadatafile parameter in the backupNow readme.

geoffaskam commented 1 year ago

Thanks Brian, I’ll take a look.

geoffaskam commented 1 year ago

Appears to work well, thanks Brian (once I’d amended job to also use directive file)

Regards