Backing up and Restoring BAMS


Revised: March 10, 2011, OL-11618-18

Backup Utility

The BAMS utility, bamsbackup, can be used to back up the current configuration files, all executable files and intermediate files (that is, incompletely processed files in the /output directories and checkpoint files). You can also specify whether to back up the billing files (BAMS output files and the archived CDR files from the PGW). You can specify to back up to a regular file or a tape device.


Tip Before you start the backup utility, check the directory /opt/CiscoBAMS/bin for the file ADMss. It should be present before starting bamsbackup.

Format

bamsbackup [ -y ] [ -b | -n ] [ -f filename | -t device_name ]

Description

The value of -y is do not prompt user to confirm backup.

The value of -b is back up billing files.

The value of -n is do not back up billing files.

The value of -f filename is back up to regular file named filename.

The value of -t device_name is back up to tape device named device.

Note Only one of the -b/-n or -f/-t flags can be used in the same command.

Example

$ bamsbackup

-b or -n parameter must be specified to indicate whether billing files are to be backed up:

b) Back up billing files

n) Do not back up billing files

q) Quit

Enter selection (b,n,q): b

-f or -t parameter must be specified to indicate backup to file or tape device:

f) Backup to file

t) Backup to tape device

q) Quit

Enter selection (f,t,q): f

Enter backup filename: /tmp/bamsbackup.12252004.cpio

Backup filename specified: /tmp/bamsbackup.12252004.cpio

***********************************************************************

The program /opt/CiscoBAMS/bin/bamsbackup will archive the following to the file /tmp/bamsbackup.12252004.cpio:

1) Current BAMS configuration files

2) All BAMS executables

3) All BAMS intermediate files

4) All BAMS billing output files

Do you want to continue with bamsbackup (y/n)? y

/opt/CiscoBAMS/bin

/opt/CiscoBAMS/bin/ACC

/opt/CiscoBAMS/bin/ADMal

.

.

.

229280 blocks

Backup successful.

Program /opt/CiscoBAMS/bin/bamsbackup complete. All files archived to /tmp/bams

backup.12252004.cpio


Restore Utility

The bamsrestore utility restores BAMS 3.20 and later releases from any previously backed up files.

The restore utility prompts you to back up the current files, and proceeds only after a confirmation to do so.

The restore utility provides an option to restore files from a backup file or a tape device. The utility also provides an option to restore the billing output files.


Tip Before you start the restore utility, check the directory /opt/CiscoBAMS/bin for the file ADMss. It should be present before starting bamsrestore.

Format

bamsrestore [ -y ] [ -i | -k ] [ -b | -n ] [ -f filename | -t device_name ]

Description

The value of -y is confirm (that is, the user is not reminded to restore current files).

The value of -i is restore intermediate files (applicable only if restoring the same BAMS version).

The value of -k is keep intermediate files, do not restore intermediate files (applicable only if restoring the same BAMS version).

The value of -b is restore billing files.

The value of -n is do not restore billing files.

The value of -f filename is restore from regular file named filename.

The value of -t device_name is restore from tape device named device.

Note Only one of the -i/-k, -b/-n or -f/-t flags can be used on the command line. If the -y flag is not provided, the utility reminds you about backing up current files and prompts for confirmation.

Example

$ bamsrestore

-b or -n parameter must be specified to determine whether billing files are restored:

b) Restore billing files

n) Do not restore billing files

q) Quit

Enter selection (b,n,q): b

-i or -k parameter must be specified to determine whether intermediate files are restored:

i) Restore intermediate files

k) Keep current intermediate files. Do not restore intermediate files q) Quit

Enter selection (i,k,q): k

-f or -t parameter must be specified to indicate restore from file or tape device:

f) Restore from file

t) Restore from tape device

q) Quit

Enter selection (f,t,q): f

Enter restore filename: /tmp/bamsbackup.12252004.cpio

Restore filename: /tmp/bamsbackup.12252004.cpio

Current BAMS Version = 3.20

/opt/CiscoBAMS/bin/ADMss

229280 blocks

BAMS restore VERSION = 3.20

Current BAMS Version 3.20 is the same as the restore version of 3.20.

***********************************************************************

The program /opt/CiscoBAMS/bin/bamsrestore will restore the following from the file /tmp/bamsbackup.12252004.cpio:

1) Current BAMS configuration files

2) All BAMS executables

3) All BAMS billing output files

* Current BAMS intermediate files will be kept. Intermediate files

* will not be restored from /tmp/bamsbackup.12252004.cpio

Before restoring from /tmp/bamsbackup.12252004.cpio, the current BAMS files should be backed up using the utility 'bamsbackup'.

Do you want to continue with bamsrestore (y/n)? y

Saving current intermediate files since restore from FILES_DIR will overwrite these

/opt/CiscoBAMS/files/s01/acc_checkpt

/opt/CiscoBAMS/files/s01/cor_checkpt

/opt/CiscoBAMS/files/s02/acc_checkpt

20 blocks

Restoring files from /tmp/bamsbackup.12252004.cpio ...229280 blocks

Restore successful.

Example (continued)

Restoring current intermediate files since these were temporarily overwritten by the restore from FILES_DIR

/opt/CiscoBAMS/files/s01/acc_checkpt

/opt/CiscoBAMS/files/s01/cor_checkpt

.

.

.

20 blocks

For listing of files restored from /tmp/bamsbackup.12252004.cpio, see:

/tmp/bamsrestore.list.20041006143211

Program /opt/CiscoBAMS/bin/bamsrestore complete


Restoring the Same BAMS Release as the Current BAMS

The restore utility prompts you whether to restore the intermediate files and billing files.

If you want to restore intermediate files, the restore utility removes the current intermediate files in the output directory and the checkpoint files, then restores intermediate files from the backup version.

If you do not want to restore intermediate files, then only executable and configuration files are restored. The current intermediate files are not touched.

Restoring a Different BAMS Release than the Current BAMS

The restore utility removes the current intermediate files in the output directory and the checkpoint files, then restores intermediate files from the backup version.