Database Backup and Restore Commands
Due to the sensitivity of the data contained in the ATM Availability and, to a lesser extent, the ServiceTime databases, nightly backups are made of both of these databases. The backups are retained for two days after which they are overwritten with the next day’s backup.
The backups are automatically run after the previous day’s data is summarized as part of the scheduled 'aim_run_backup_and_summaries.bat' script.
In addition, special one-off backups can be run manually at any time, using the same utility that is used overnight to back up the databases. The location of these one-off backups can be specified on the command line to the utility.
The restoration of databases also has to be performed using this command line utility.
Backup and Restore Utility
ATM Outage Adjuster includes a utility that is used to backup the Reporting and Service Time databases. It is also used to restore a database if a problem occurs when carrying out an outage adjustment.
The file name for this tool is 'AimDbBackup.exe' and it is located in the following folder path:
Prognosis\Server\ATM Outage Adjuster
The Outage Adjuster utility is supplied with two default backup files for each of the Reporting and Service Time databases. In addition, a log file is also maintained. The path and names for each of these files are user defined and are maintained in a configuration file by using the Setup parameter that is described below.
The Outage Adjuster Utility is run from a command line by entering the command;
>AimDbBackup
…followed by the required parameters and options as shown below.
Parameters & Options
”C:\Program Files\Prognosis\Server\ATM Outage Adjuster\backups\AvailBackup1.bak”
Setup - Backup Path
-s (or -set) BackupPath=[<filepath>]
The Setup parameter is used to configure where the default Availability and Service Time backups are placed.
Example:
>aimdbbackup -s BackupPath="c:\ATMBackup"
Both the path and file name must be specified in the command entry.
Setup - Availability and Service Retention
-s (or -set) [AvailRetention|ServiceRetention]=[<integer value>]
This Setup parameter is used to configure the number of default Service Time and Availability backup files.
Example:
>aimdbbackup s- AvailRetention=3
The integer value must be a valid and positive integer.
Backup - Availability Database
-ba (or -backupAH) [<new backup file path>]
This will backup the current Availability database to either the default backup files specified in the .ini file or to a new backup file.
A new Availability backup file is created or modified by inserting a full path and file name, the path must already exist but the utility will create the file name if it is not found.
If no file details are defined with this parameter the oldest default backup file will be used.
A supplied script is used to automatically run the backup process each night at midnight. However, the Outage Adjuster utility can be run manually at any time to carry out a backup.
Example:
>aimdbbackup -ba
This will backup the current availability database to the oldest default backup file.
Backup - Service Time Database
-bs (or -backupST) [<new backup file path>]
This will backup the current Service Time database to either the default backup files specified in the .ini file or to a new backup file.
A new Service Time backup file is created or modified by inserting a full path and file name, the path must already exist but the utility will create the file name if it is not found.
If no file details are defined with this parameter the oldest default backup file will be used.
A supplied script is used to automatically run the backup process each night at midnight. However, the Outage Adjuster utility can be run manually at any time to carry out a backup.
Example:
>aimdbbackup -bs
This will backup the current Service Time database to the oldest default backup file.
Restore - Availability Database
-ra (or -restoreAH) [<integer value>|<backup file path>]
This will restore the current Availability database from either the default backup files specified in the .ini file or from a specified location. The backup must exist and must be a valid SQL backup. A full path and file name will be required if restoring from a specific location or by an integer value which is a valid available retention value. If no inputs are supplied with the restore then it will restore the most recent backup.
Example:
>aimdbbackup -ra 1
This will restore the first default Availability backup.
Restore - Service Time Database
-rs (or -restoreST) [<integer value>|<backup file path>]
This will restore the current Service Time database from either the default backup files specified in the .ini file or from a specified location. The backup must exist and must be a valid SQL backup. A full path and file name will be required if restoring from a specific location or by an integer value which is a valid available retention value. If no inputs are supplied with the restore then it will restore the most recent backup.
Example:
>aimdbbackup -rs
This will restore the most recent default Service Time backup.
Confirmation Messages
-a (or -always)
Add this parameter to always have a confirmation message displayed after the input of a backup command.
Example;
>aimdbbackup -a
List
-l (or -list)
This provides a list of the current default backup files together with their last modification dates and the log file output.
Example;
>aimdbbackup -l
Command Help
-? (-h or -help)
This parameter will show the help information for the Aimdbbackup command.
Example;
>aimdbbackup -?