Ad-hoc backups are on-demand backups that allow subclient content to be specified as an external input when starting a backup operation. When you start an ad-hoc backup from the command line, you can specify the content in a directive file.
Before You Begin
-
To perform ad-hoc backups from the command line, you need an input xml file (ad_hoc_backup_template.xml) which contains the parameter values for configuring the backup options. For more information on command line parameters and XML elements, see Command Line - Syntax.
The input xml file can be obtained from one of the following ways:
-
Download the input xml file template and save it on the computer from where the backup will be performed.
-
Generate the input xml file from the CommCell Console and save it on the computer from where the backup will be performed. For more information on saving operations as scripts, see Save as Script Overview.
-
-
You must create the following text file to specify where the content is located for ad-hoc backup jobs:
-
A directive file, which is a text file that defines the location of the data that you want to back up.
For information on the format of a directive file, see Directive File Format for On-Demand Backups.
Wildcards are supported in the directive file. To prevent square brackets from being treated as wildcards, you must define an escape character. For more information on wildcards, see Wildcards for the Windows File System Agent.
For information on including files and folders with Unicode names in the directive file, see Adding Files and Folders with Unicode Characters to Directive Files.
For information on configuring the directive file to exclude duplicate file names, see Configuring Directive File to Exclude Duplicate Entries.
-
Procedure
-
Download the ad_hoc_backup_template.xml file and save it on the computer from where the command will be executed.
-
From Command prompt, navigate to software_installation_directory/Base and run the following command:
qlogin -cs commserve_host_name -u user_name -
Execute the saved .xml script using qoperation execute command.
qoperation execute -af ad_hoc_backup_template.xml -clientName client_name -backupsetName backup_set_name -subclientName subclient_name -onDemandInputFile absolute_path_to_directive_file.txt -
Verify the status of the job using the following command:
qlist job –j JOBID -
Once the job completes, logout from the CommServe using the qlogout command.
qlogout [-cs commserve_host_name] [-all] [-tf tokenfile] [-tk token] [-h]
Example
qoperation execute -af ad_hoc_backup_template.xml -clientName client1 -backupsetName backupset1 -subclientName subclient1 -onDemandInputFile E:directive1.txt
What to Do Next
To restore ad-hoc backup data, perform a restore operation. For more information, see Restoring Data Using the Windows File System Agent.