Archive
Archive manages the database server and archive location, monitors the local database service status, and performs maintenance.
Logging is to a FireBird data base (also 32 or 64 bit). The
DB need not be on the same machine or operating system.
FormTrap Server has one FireBird database for all the job processing
and delivery information. Location is stated in Database server
and archive location and options.
Modification of the DB password is possible for security reasons, see HERE (DB is deliberately undocumented and is within the fire wall).
From version 8.7, we allow complete deletion of the DB under program
control. This is for banks and huge-sized establishments repeatedly
processing hundreds of thousand of pages in one file. This is NOT
a normal operation as would be the case with an ERP-based FormTrap
Server.
Recovery is built-in by logging of the data for each task
before release to the external process. The database deletes no
longer required transactions several times per day, and you should
schedule Backup and Recovery if the database gets too large. Backup
and Recovery removes deleted space from the database, returning it
to the system as free space.
The alternate of total DB deletion is reserved for banks and similar
operating environments.
Note: Setup of the archive on another machine is not a part of these instructions. Please contact support@formtrap.com for details and a quotation if you would like your system set up this way.
- Select the Server location (IP address) from the dropdown menu. "localhost" means the database is located on the local machine.
- Enter the Folder name, and make sure to use a disk drive that is local to "localhost" server.
Local database service should show Service status Ok. Jobs in Archive View only display with OK status.
Note: It is not recommended to stop the Local database service as FormTrap Server stops operating. The only case would be to obtain a “cold” backup of the database.
The current File size can be found in the Maintenance section.
Note: Prompts Cleanup frequency and Reset
archive are omitted prior to Version 8.7. Press HERE to bypass Version 8.7 features.
Normal Systems processing less than 30,000 transactions per day
The FireBird DB operates as “high watermark” meaning the file size
never shrinks, instead deleted space is re-used. The DB auto-expands
until the point where deletions roughly equate to additions, at
which time it stabilizes - that is with Reset archive set to
Never (cleanup old records only). That is typically around
the 5 GB mark and depends on the retention period Number of days
to keep records in Queues, General tab.
A zero value in Number of days ... means indefinite
retention, hence a large and growing DB. Deletion of obsolete
records happens several times per day with the period selected from
Cleanup frequency where a value of 12 hours is appropriate.
Cleanup happens only if there is no current activity within FormTrap
Server, otherwise is delayed until the next interval.
Note: A batch task under Queues, Tools,
Batch Update ..., Set days to keep records ... sets
expiry dates on all queues.
Systems with huge volumes, processing several hundreds of thousands of transactions
With huge systems, the issues are very different. Idle time to
clear the DB occurs infrequently (due to long run times) and the
time taken to clear individual transactions is also huge. For these
situations, options to check often and to clear the DB very quickly
are provided. What is shown below is typical for a bank.
Cleanup happens only if there are NO transactions within the
within FormTrap Server (ie system is completely idle),
otherwise is delayed for an additional next interval. For this
reason, set Cleanup frequency short so the system checks
often for a break in transaction processing (to ensure there IS a
break periodically).
All options except Never (cleanup old records only) remove
the entire DB and recreate it - in seconds.
You may place the DB on a different drive, this is recommended if
your DB is large and infrequently backed up and restored.
Follow these instructions to move your FormTrap Archive to another
drive (preferably print them now as you will need to stop and
restart FormTrap):
- On Setup, Archive, set Folder (to the
new folder on a different drive) and Save. This warning
appears, press Yes.
- Exit from FTClient.
- Go to Control Panel, Administrative Tools, Services and stop FireBird Server (which also stops FormTrap Server).
- Copy the existing %fthome\formtrap.fb3 to the new location (or to create an empty DB, eliminate this step) - File is formtrap.fdb for version 8.12 and earlier.
- Restart FormTrap Server (also restarts FireBird Server).
- Start FTClient, check Setup, Archive, Folder is for the new folder and check Archive operates as normal.
Managing your DB
DB Management revolves around maintaining space for new archive entries - this section is normally consulted in an emergency when space for new archive entries needs to be made immediately. There are four alternatives, presented in order of the least upset to your current operations:
- Delete old entries using Archive, All, Delete, either selecting old entries and pressing Selected jobs... or All jobs in the query.... This does NOT recover DB space, but allows re-use of the deleted entries. No stoppage of transaction processing is required.
- Delete the entire DB and create a new "empty" DB. This takes seconds, BUT means your FormTrap Service is unavailable briefly. Via Control Panel, Administrative Tools, Services stop FireBird Server (which also stops FormTrap Server). Go to %fthome and delete or rename Ffirebird.fb3 (firebird fdb for version 8.12 and earlier). Restart FormTrap Server (which restarts FireBird Service which generates an empty firebird.fb3).
- Move the entire DB to a new drive, see above, this takes less than 2 minutes.
- Backup and restore the DB - this recovers "empty" space, however is the longest procedure. You must stop transactions while this is done, however the service still runs and accumulates transactions.
To Stop Transactions while Backup or Delete DB Maintenance takes place:
- Pick a period when nothing will be issued by your application(s).
- Under Setup, Data Input, check all three methods and write down all that are Current State, Running; and press Stop. All three methods should be Current State, Not running.
- Check there is nothing in flight by viewing Archive, Working (and Refresh the view). Your Server can no longer receive transactions.
- It is now safe to run your required procedure on the DB, once complete, press Start for the Setup, Data Input methods that were previously Running.
Note that you will need Administrator privileges to run the Restore and Create procedures below.
Backup... and Restore... are used to bring the DB back to minimum size. FireBird does not recover deleted space (but does reuse deleted space, so while the DB may not shrink, it has room for additions). Backup/Restore recovers deleted space. Stop transactions prior to Backup/Restore and Start transactions when DB Maintenance is completed.
Delete file... and Create file... delete the entire current DB and replace with an empty DB. Stop transactions prior and Start transactions when complete. You should wait around 30 seconds after Delete file... before pressing the Create file... command.
Note that permanent archiving of records is provided by the Archive option, using a separate FireBird DB to permanently retain PDFs. See here.