How to backup the the Archive Manager (DDM) database
search cancel

How to backup the the Archive Manager (DDM) database

book

Article ID: 46779

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

How to backup the the Archive Manager (DDM) database

Environment

Release: 20.2.x and greater
Component: SPCAEM - Archive Manager

Resolution

There are two ways to backup the Archive Manager (DDM) database:

1. Manual Backup 

2. Online (Scheduled) Backup 

 

Manual Backup:

You can perform a DDM database backup at any time using the ddm_save.pl script

 

ddm_save.pl script:

The ddm_save.pl script, located in the $SPECROOT/SS/DDM directory, performs a full save of the historical database to the file you specify. Use the Control Panel to shut down the Archive Manager before executing the command, and then restart it when the save is completed.

Steps:

- Log into the SpectroSERVER system as the user that owns the Spectrum installation

- On Windows, open a bash shell by typing “bash -login” in command prompt.

- cd to the $SPECROOT/SS DDM directory

- The scripthas the following format:

./ddm_save.pl  [-quiet] -f <SAVE_FILE>

 Note: Please shut down the Archive Manager before executing this command.

Where the first letter of an argument name appears in bold type, you can use the letter only, rather than entering the whole name.

-quiet

Disables interactive/verbose mode.

-f <SAVE_FILE>

Specifies the name of the destination file for the saved database.

The backup file is saved in "mbi" format.

Online (Scheduled) Backup

You can also take Automatic /online backup of your DDMDB (Archive Manager's database) with the help of post_olb_script file. 

The script is located in the $SPECROOT/SG-Support/CsScript directory. When you run it with the default settings, post_olb_script backs up the DDM database immediately following any Online Backup that completed on the specified day (the default is Sunday).

Steps:

- Copy the post_olb_script file from $SPECROOT/SG-Support/CsScript directory and paste it to $SPECROOT/custom/CsScript directory. 

- Use your text editor and edit the post_olb_script 

- Remove the pound (#) sign at the beginning of last 11 lines. As seen in below screen cap. (from line "day_of_week='date +%w' to line " fi " )

day_of_week=`date +%w`
target_day=0

if [ $day_of_week -eq $target_day ]
then
    cd $SPECROOT/SS/DDM

    backup_dir=`dirname $ss_db_filename`
    ./ddm_save.pl -f $backup_dir/db_$time_string.DDMDb > $backup_dir/ddm_backup.log 2>&1
    retval=$?
fi

 

- The DDM database backup will run after any Online Backup executed on a Sunday (target day=0). Thus, if you schedule Online Backup to run daily, your DDM database is automatically backed up weekly on Sunday.

You can modify the day of the week to backup the DDM database by changing the value of "target_day".

0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday

Additional Information

Please reference the "Database Backup" section of the documentation for more information.