IS2000- Archiving from a Command Prompt

Overview:

The Archive Utility is used to partition out records from the Event and Audit databases by date. This is usually done to maximize overall performance of the system, and provide a method of archiving history records.  Data that has been segregated or archived from the main history databases can also be restored.  The Archive Utility can be used in one of two ways:  Either through the interface or through the command line arguments from a Command Prompt.

Open the Archive Utility from either the IS2000 folder or from the Utilities menu in IS2000.

Restore or Archive transaction history by selecting the desired date(s).
 

Auto Archiving:

Select the Auto Archive tab and select the number of months that you wish to keep.  If you choose 3 months, then the Archive Utility will archive everything that is 3 months old from today.  Click the Save button, and the Archive Utility will create an archive.bat file in the IS2000 folder that can be scheduled to run everyday.  The archive.bat file runs the Archive_Utility with a set of command line arguments.

Archive Utility Command Line Arguments:

Access the Command Prompt by either clicking on the Icon in the Accessories program group folder or by entering in "cmd" in the Run section of the Start bar.

Usage:

Archive_Utility <Command> <Date> <Purge Flag>
 

Arguments:

Command: The action that should be performed: B- Archive  R- Restore  X-Delete

Date: The date can be entered in one of 2 ways. You can specify a specific date in the following format mm/dd/yyyy or you can specify a specific date to backup relative to today: D14 will backup or restore on all events that occurred 14 days ago.

Purge: Numeric value from 0 to 1. 1 will purge the history records that have been backed up. This value is only read in when doing a backup command.
 

Examples:

The example below will perform a archive and purge for the records that occurred on April 4, 1999:


Archive_Utility B 04/08/1999 1

The example below will perform a archive and purge for the records that occurred on April 1, 1999, assuming today is April 4, 1999:

Archive_Utility B D3 1

To automate archives to remove events greater than 30 days, you will need to create a batch file and schedule it to run everyday. Using Notepad enter the following and save the file as "AutoArchive.BAT" in the IS2000 folder:

Archive_Utility B D30 1

Please make sure in Notepad that when you save the file, the "Save as Type" option is set for "All File Types". Launch the batch file to test that it actually works, it should archive all of the transaction and audit history event records that occurred 30 days ago and purge them from the main event and audit history tables.  The events and audits are archived to separate .mdb files in a folder specified by the ArchivePath.  If the ArchivePath was not specified, then a default folder is used (Remotepath\Log Files).  Run the Configuration Utility to configure the ArchivePath property.
 

Scheduling:

Once you've tested your batch file, and know that it works, schedule it to run everyday at 2:00am. To do this, use the Task Scheduler in Windows. You can access this by either Accessories\System Tools program folder or from the Scheduled Tasks icon in Control Panel. Once you've opened the Scheduled Tasks icon, click on Add Scheduled Task and follow the instructions, or press F1 for more help.