The 'nvsetcreate' command allows you to create a SET (Selection, Backup Options, Schedule, Target and Advanced Options)
via the Command Line Interface.
This article describes how this NetVault CLI command works with the Data Copy plugin, but it should also apply to other
plugins such as Consolidate Incremental Backups, and Raw.
Up until now the use of nvsetcreate was believed to be impossible with the Data Copy, Consolidate Incremental Backups,
and Raw plugins as stated in Jira fault: NVG-2731.
The reasons for this was that the syntax of the 'nvsetcreate' command only allows to specify a '-include' switch
for your selection. This '-include' switch only allows the user to specify a Path such as:
This is perfect for the File System plugin, but the problem appears when trying to use this command with the Data Copy plugin.
The Data Copy plugin when looked at via the GUI, offers 2 methods: Backups and Backup Sets. Inside these 2 methods you will find the
clients to select. Underneath the client will be the plugin to use and inside the plugin the saveset to copy...
With so many levels to select, how could users use this command with an -include switch that only accepts a path?
Not knowing the correct syntax would only enable users to create a Selection Set that stops at the Data Copy first element in the tree.
For more information on this topic, please see the Module 4-Advanced Administration Part Two-Web-based Training
The solution is to treat the selection seen in the GUI as a path in itself:
- use '/' to separate the tree items (regardless of the OS, the forward slash would work in any platform)
- delimit the path used in -include switch with quotes around the string
- as per the saveset, the job title isn't sufficient, you need to include the whole expression as seen in the GUI:
"..../JobTile(Savesetnum) hh:mm DD MM YYYY"
- of course anything inside double quotes IS case sensitive
Here is an example of a successful command:
C:\>nvsetcreate -setname DataCopy1 -type BS -client ukwk1115 -plugin "Data Copy" -include
"Backups/ukwk1115/File System/spanningTapes (Saveset 106) 11:00 31 jul 2007"
Created set 'DataCopy1'
This set can now be used in conjunction with the 'nvjobcreate' command to run jobs via the Command Line Interface.