Command Line Backup - Macintosh File System iDataAgent
Perform the Backup
In order to run the backups from command line, you need an input xml file which contains the parameter values for configuring the backup options. This 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 by using the Save as Script option, and save it on the computer from where the backup will be performed.
- Download the 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 backup_template.xml -backupLevel FULL -backupsetName xxxxx -subclientName xxxxx -clientName xxxxx
- 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]
Performing a Full Backup
qoperation execute -af backup_template.xml -appName 'File System' -clientName client1 -backupsetName backupset1 -subclientName subclient1 -backupLevel FULL
Performing an Incremental Backup
qoperation execute -af backup_template.xml -appName 'File System' -clientName client1 -backupsetName backupset1 -subclientName subclient1 -backupLevel INCREMENTAL
Performing a Synthetic Full Backup
When you run a Synthetic Full backup, an incremental backup is automatically ran first to ensure that new data since the last backup is included in the synthetic full.
qoperation execute -af backup_template.xml -appName 'File System' -clientName client1 -backupsetName backupset1 -subclientName subclient1 -backupLevel SYNTHETIC_FULL
Performing an Ad-Hoc Backup
The first ad-hoc backup is always a full backup. The subsequent ad-hoc backup jobs run as incremental jobs. For more information about ad-hoc backup jobs, see Ad-Hoc Backups.
qoperation execute -af ad_hoc_backup_template.xml -clientName client1 -backupsetName backupset1 -subclientName subclient1 -onDemandInputFile /etc/directive1.txt
Generate the Command Line Script from the CommCell Console
In addition to the parameter values provided in the template xml file, if you want to include additional options for the backup, you can do so by selecting the required options from the CommCell Console and generate the command line xml script for the backup.
Follow the steps given below to generate a script which you can use to perform a backup from the command line interface:
- From the CommCell Console, navigate to <Client> | File System | defaultBackupSet.
- Right click the default subclient and click Backup.
- Select the required backup options which you want to execute using the script.
- Click Save as Script.
- Enter the location to save the script along with the file name and extension. For example, "C:\scripts\myscript.bat" on Windows and "/usr/scripts/myscript.sh" on Unix. Alternatively, you can also click Browse and navigate to the location.
The script will be saved as a .xml file and .bat/.sh file.
If a file with the same name already exists in the specified location, both the .xml and .bat/.sh files will be overwritten.
- Enter the username and password for the user account which you want to use to perform the backup.
By default, the user account which you have used to login to CommCell console is used for performing the backup. However, if the user account does not have access to any application or database, click Use a different account.
- Click OK.
Last modified: 1/15/2018 8:39:54 AM