Loading...

Archiving Backup Jobs in the CommServe Database

You can archive backup job records of specific clients from the CommServe database.

About This Task

Use the ArchiveLongTermMetadata script to archive metadata records of backup jobs for specific clients from the CommServe database. You can specify multiple clients as a comma-separated list or provide a text file with the list of client names.

The script identifies the records that are eligible for archiving and stores the job list in a JobsToArchive file for a client. Next, the script identifies the media associated with the job list and moves the media to the Overwrite Protect pool. The identified media list is stored in a MediaArchiveList file for the client. The JobsToArchive and MediaArchiveList files are saved under the client folder in the output location specified when running the script.

The process is repeated serially for all the listed clients.

The archived jobs are removed from the CommServe database during the next data aging operation.

Before You Begin

Ensure that you meet the following requirements:

  • Install the following packages on the CommServe computer.

    Python 2.7.6 software

    ODBC modules

    Python Windows 32 package

  • Add the Python installation path to the Windows environmental system variables.
  • Make sure that you have the latest Service Pack installed on your CommServe computer.
  • You must have a user account on the Cloud Services web site. To create a user account, register your CommServe computer. If you already have a user account, you still might need to register your CommServe computer. For instructions, see Getting Access to the Cloud Services Web Site.

Procedure

  1. From the Cloud Services website, on the Software Store page, download the python script.
  2. From the Software Store, copy the GetCapturedEntities sql script  to the installation_directory/Base folder on the CommServe computer.
  3. From the CommServe computer, at the command line or Windows PowerShell prompt on, go to the download location, and then type the following command with the appropriate parameter values:

    python -m ArchiveLongTermMetadata --tt yyyy-mm-dd --d xxxx --csu xxxx --csp xxxx --dbu xx --dbp xxxxx --qdb xx --clf “xxx.txt" --cl "xxxx”

The following table lists the parameters used with the script.

Parameter Description
cl The client name. To specify multiple clients, enter the list of client names separated by a comma. Only records of the backup jobs for the specified clients are archived.
clf The complete path to the client list text file. You can add the list of clients in the text file. Use this parameter if you want to archive the jobs of several clients.
tt Date stamp in yyyy-mm-dd format. Backup jobs that were run prior to the specified date are archived.
d The destination client directory. Archived backup job history list for each client is copied to the client directory.
csu The user logon name for accessing the CommServe computer.
csp The password for the user logon name.
csi The CommServe instance name. Default: Instance001.
dbn The CommServe database name
dbu The SQL user name for accessing the CommServe database
dbp The password for the SQL user namee
rtv The number of retry attempts. Default value is 50.
sd Specifies whether to skip a date checking. Default: no.

Tip: For test purposes, if you want to skip archiving the job records that are less than 3 months old, set the value to yes.

For your production environment, we recommend that you retain the default value.

qdb Specifies whether the script verifies that the job records already exist in the archived job history list for the client. Default: yes.

For test purposes, you can disable the system check by setting the value to no.

For your production environment, we recommend that you retain the default value.

Result

The command output lists the number of clients with successfully archived jobs and clients that failed the archiving process.

For example:

Total PASSED Metadata Archived clients = 1
Total FAILED Metadata Archived clients = 0

The log files are saved under the client folder in the output location specified when running the script.

Example

The following command uses a client list file:

python -m ArchiveLongTermMetadata --tt 2014-11-20 --d C:\Export\CLIENTS --csu admin --csp admin --dbu sa --dbp password --qdb no --clf “C:\ClientList.txt”

The following command uses individual client names:

python -m ArchiveLongTermMetadata --tt 2014-11-20 --d C:\Export\CLIENTS --csu admin --csp admin --dbu sa --dbp password --qdb no --cl "xldn0156dsy,myclient”