Table Of Contents
Database Backup and Restore
Overview
Backed-Up Content
Backup Procedure
Troubleshooting
Changing Periodic Backup Time
Restore Procedure
Database Backup and Restore
This appendix describes the database backup and restore procedure.
•
Overview—Provides an overview of the backup procedure.
•
Backed-Up Content—Describes the data that is backed up.
•
Backup Procedure—Describes how to activate the backup procedure.
•
Changing Periodic Backup Time—Describes how to change the backup time.
•
Restore Procedure—Describes the restore procedure.
Overview
The backup procedure is used to perform data backup once a week. It operates through the UNIX cron mechanism. The factory settings entry in the cron table (crontab) runs the backup procedure every Sunday at 1:00 AM. To activate the backup procedure, the user needs to remove the comment for the relevant line in the cron table.
The restoration is done manually by executing the restore.pl script.
Backed-Up Content
The data that has been backed-up is:
•
Cisco ANA database
•
Cisco ANA registry (Golden Source)
•
cron table (crontab)
Backup Procedure
The backup script is a scheduled task. It operates through cron.
The backup files are stored in the following directory,
~[ana install directory]/db/db_backup/[date+time].
Note
The filler [date+time] is a directory name composed of a date and time of the backup. For example,
~[ana install directory]/db/db_backup/200604130404/ is created on 13 April 2006 at 4:04 AM. By default the cron table executes the backup procedure every Sunday at 1:00AM.

Note
Important: Reinstalling the server from scratch (install.pl) deletes the sheer user, and the content under it. The default backup directory is located under sheer, and it can be changed (see configuring the registry below) to another location, which must be accessible to writing for the sheer user, for example, the default directory permissions are: ("drwx------ 2 sheer sheer 512 Sep 24 02:54")
It is also recommended that you do not locate the backup directory under /tmp, since this directory is deleted whenever the server is rebooted, and the backup content will be lost.
To maximize data safety, it is recommended that you copy the backed-up directory to another external storage location, for example, a DVD or another server's disk.
The location is configurable through the registry. For more information, refer to registry path, avm11/agents/integrity/backup.
The figure below displays the backup registry entries.
Figure A-1 Backup Registry Entries
The backup is disabled by default.
To enable the backup:
Step 1
chmod g+r <ORACLE data files location path>/sheer_DATA.dbf
chmod g+r <ORACLE data files location path>/dwe_DATA.dbf
Step 2
Telnet to the Cisco ANA gateway as sheer user.
Step 3
Edit the cron table as follows:
crontab -e
Step 4
Add the following line to the file, and save the change:
0 1 * * 0 cd Main;./mc.csh localhost 8011 integrity.executeTest backup > /dev/null 2>&1
Note
Refer to crontab(1) in the Solaris documentation for a detailed explanation about the cron table format.
The user can activate the backup procedure immediately.
To activate the backup procedure immediately:
Step 1
chmod g+r <ORACLE data files location path>/sheer_DATA.dbf
chmod g+r <ORACLE data files location path>/dwe_DATA.dbf
Step 2
Telnet to the Cisco ANA gateway as sheer user.
Step 3
Change the directory to sheer/Main by executing the following command:
cd ~/Main
Step 4
At the prompt, run the following command line:
./mc.csh localhost 8011 integrity.executeTest backup
Troubleshooting
The following messages may be displayed when using the backup procedure:
1.
sheer@sh-nv210-1v5 [~/Main]% The authenticity of host `127.0.0.1 (127.0.0.1)' can't be established.
DSA key fingerprint is 4e:cb:81:1c:bf:38:5c:ec:6e:b8:a8:d3:3b:d4:fe:b9.
Are you sure you want to continue connecting (yes/no)?
Solution
From sheer user do the following:
ssh 127.0.0.1
2.
In the [backup-files-location]/backup.log file:
cp: cannot open /export/home/oracle/Ora920/dbs/arch/1_13.dbf: Permission denied
Solution
From root user do the following :
chmod g+r /export/home/oracle/Ora920/dbs/arch/*dbf
Changing Periodic Backup Time
A crontab file consists of lines of six fields each. The fields are separated by spaces or tabs. The first five are integer patterns that specify the following:
•
minute (0-59)
•
hour (0-23)
•
day of the month (1-31)
•
month of the year (1-12)
•
day of the week (0-6 with 0=Sunday)
To specify days using only one field, the other field should be set to *.
For example, 0 0 * * 1 would run a command only on Mondays.
Another example cleans up core files every weekday morning at 3:15 am:
15 3 * * 1-5 find $HOME -name core 2>/dev/null | xargs rm -f
The sequence 0 0 1,15 * 1 runs a command on the first and fifteenth of each month as well as every Monday.
Restore Procedure
Install the Cisco ANA gateway. For more information, refer to the Cisco Active Network Abstraction Servers Installation Guide. Note that you will need to login as root.
To restore from a backup:
Step 1
Change the directory /export/home/[ana install directory]/Main/scripts by executing the following command:
cd ~[ana install directory]/Main/scripts
Step 2
Execute the restoration script:
restore.csh [backup-files-location] [sheer-home-location] [oracle-home-location]
Note
By default the [backup-files-location] is ~[ana install directory]/db/db_backup/[date+time] (this is configurable through the registry). The filler [date+time] is a directory name composed of a date and time backup time. For example, ~[ana install directory]/db/db_backup/200604130404/ is created on 13 April 2006 at 4:04 AM.
Step 3
Once the restoration is successful, initialize the Cisco ANA gateway by running the following command:
Note
The default password for the user sheer is sheer.