Use this command to create a backup or restore job. A job can be created to be submitted later. This is done by submitting a job title and using pre-defined Selection Sets.
Note: The “nvjobcreate” command does not provide any option to set the Restore Options. These must be included in the Restore Selection Set to be used. The “nvsetcreate” command offers an option that is used to incorporate Restore Options into the Restore Selection Set. For details, refer to nvsetcreate on page 67.
Syntax
nvjobcreate [-servername <NVBU Server Name>] -jobtitle <Job Title> -type <Job Type>
[-selectionsetname <Backup/Restore Selection Set Name>] [-selectionoptionssetname <Backup Options Set Name>]
[-schedulesetname <Schedule Set Name>] [-backupoption <Backup Option>=<value>]
[-targetsetname <Target Set Name>]
[-advoptssetname <Advanced Options Set Name>] [-jobidfile <Output File Name>]
-submit -parameters <Parameter File Name> [-version]
Options
-servername – Name of the NVBU Server that is to administer the job. If the job is to be administered by a remote NVBU Server, this option must be used to name that specific server. If the local instance of the NVBU Server is to be used to administer the job, this option can be left out of the syntax. The server name is case sensitive.
-jobtitle – Job Title
-type – Job Type – backup or restore. The default job type is “backup”. -selectionsetname – Name of the Selection Set to be used with a backup/
restore job. This can be a set that was created in the NVBU Console or using the “nvsetcreate” command described on page 67.
-selectionoptionssetname – Name of the Backup Options Set. This option is only applicable to backup jobs.
-schedulesetname – Name of the Schedule Set. The job will be scheduled to run immediately if this option is not used. This can be a set that was created in the NVBU Console or using the “nvsetcreate” command described on page 67.
-backupoption – Sets the Backup Options for a job. The “Tag ID” of the window item to be set is required. This can either be the backup option name as recognized by the CLI or a numeric value assigned to the option by NVBU. Both of these values are grouped under the “[Plugin Options]” section in the “nvsetmodify.cfg” configuration file. For details, refer to The
“nvsetmodify.cfg” File on page 17. Specify either of these values in place of the “<field>” variable. “<Value>” can be set to “True” to enable or “False” to disable the option.
Note: This option must be followed by a space (“ ”) before the Tag ID. For example, “-backupoption <Tag ID>=True/False”.
-targetsetname – Name of the Target Set used to specify the target media and drive details. This can be a set that was created in the NVBU Console or using the “nvsetcreate” command described on page 67. The default target options as displayed in the NVBU Console are used if no Target Set is specified.
-advoptssetname – Name of the Advanced Options Set. This can be a set that was created in the NVBU Console or using the “nvsetcreate” command described on page 67. The default Advanced Options displayed in the NVBU Console are used if no Advanced Options Set is specified for the backup or restore job.
-jobidfile – Name of the file to write the Job ID to.
This option is useful if the nvjobcreate command has been configured to return the exit status instead of the Job ID. For details on configuring
nvjobcreate to return the job exit status, refer to the Quest NetVault Backup Configuration Guide. You can specify an absolute or a relative path for the file. The file will contain the Job ID as a string that can be read by a calling script. NVBU will not delete this file. It must be deleted manually after use. -submit – Use this option to submit a job and list it as an active job. If
omitted, the job will be saved but not run or scheduled. The job may be scheduled at a later time using the nvjobmodify command.
-parameters – Use this option to redirect nvjobcreate to read options from a given parameter file so that you do not have to enter them each time the command is run. You can create this file using any standard text editor. Enter one option (with its value) per line and omit “-” before the option. Use spaces or tabs to separate the option and values. For comments, begin the line with a # character. Such lines will be ignored.
Following is an example of a parameter file named example.txt: # nvjobcreate example file
jobtitle cli job 1
selectionsetname cliselset
This file can be used with the -parameters option as follows: ./nvjobcreate -parameters example.txt
-version – Displays the build date of the NVBU distribution.
Examples
Create an Incremental Backup job using a Backup Selection Set named “NVCLIENT 1 Full Data Backup” and Schedule Set named “Repeating 1” that was created to have the job run at a later time. The Job Title is
“Incremental Backup of NVCLIENT1” and it will be administered by the local NVBU Server.
nvjobcreate -jobtitle “Incremental Backup of NVCLIENT1” -type backup -selectionsetname “NVCLIENT 1 Full Data Backup”-backupoption ntfsopt_typeincr=true
-schedulesetname “Repeating 1” -submit
Submit a restore job that will run immediately. The Job Title is “Restore of Full Backup” This backup was administered by a remote NVBU Server named “NVSERVER2”. The data items to be restored have been included in a Restore Selection Set named “RestoreFull”.
nvjobcreate -jobtitle “Restore of Full Backup”
-servername NVSERVER2 -type restore-selectionsetname RestoreFull -submit
Notes
After using the nvjobcreate command to create one or more jobs, if you run the following nvreport command, the Scheduler may crash:
nvreport –class “Defined Jobs” –format “%SelectionOptions” Workaround: From the NVBU Jobs window in the NVBU Console, open the jobs for editing and save them without any changes.