Archive Manager (DDMDB) database backup

Document ID : KB000046779
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How to take Archive Manager database (DDMDB) backup.

 

Answer: 

There are two ways to take Archive Manager's Backup. 

1. Manual Backup 

2. Online (Scheduled) Backup 

 

1. Manual Backup:

You can perform a DDM database backup at any time using the ddm_save or ddm_backup tools.

 

ddm_save Utility:

The ddm_save utility, 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 utility has the following format:

./ddm_save [-extension] [-quiet] <SAVE_FILE>

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

 

#Example with -quiet option(Below example is on Windows Machine):

 1.JPG

#Example without -extension or -quiet option:

 2.JPG

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

-extension

By default, ddm_save assigns a .tgz file extension to the file. When this argument is specified, the file is saved without a file extension.

-quiet

Disables interactive/verbose mode.

<SAVE_FILE>

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

 

Note: The ddm_save command saves the necessary database files to a gzipped tar file format with a default file extension of .tgz.

 

 

ddm_backup Utility:

 

The ddm_backup utility, located in the $SPECROOT/SS/DDM directory, shuts down the Archive Manager, executes the ddm_save command, and restarts the Archive Manager when the save has 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 utility has the following format:

./ddm_backup <SAVE_FILE>

#Example : 

3.JPG

<SAVE_FILE>

 

Specifies the name of the destination file for the saved database. Supply a fully qualified file path with the destination file name to save the file in that location. If a fully qualified file path is not specified, the file is saved in the DDM directory.

 

 

2.  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 " )

Sunday.JPG

 

- The DDM database backup is scheduled 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.

 

- If you wish to take DDMDB backup along with every SpectroSERVER database using Online backup, uncomment only the last five lines of the post_olb_script file (from line " cd $SPECROOT/SS/DDM" to line " retval=$? ") as shown in below screen cap. 

WithOLB.JPG