Archiving

Blue Prism provides an archiving facility to ensure the continued efficient running of your database server, whilst preserving a complete and accurate record of all activity. Archiving involves the transfer of session log data from the database to a file structure, freeing up database space and allowing permanent archiving of the old data. The archived data can also be restored back to the database at any time.

There are three mechanisms available for archiving – two are manually initiated and one is an automatic background task for a running resource:

  • System Manager Interface – In this mode of operation, you are able to accurately select particular session logs at various levels of granularity (e.g. by day, month, process, PC) and archive them. Likewise, selected logs can be restored
  • Command Line Interface – This method makes it simple to set up a scheduled task to archive on a regular basis. For example, you might decide to archive logs older than 6 months, and do this on a nightly basis
  • Automatic Archiving – A registered resource can be nominated to automatically archive the session logs on a regular basis. This checks throughout the day while the resource is running and performs an archive in the background as required.

Archiving logs manually

The manual archiving is configured and executed on a per-machine basis – changing the archive directory on a machine will change it locally on that machine only.

  • Sign in as a Blue Prism user possessing sufficient permissions to access System Manager.
  • Enter the "System" section of System Manager and visit the "Archiving" tab.
  • For the "Archive Folder", use the "Browse" button to select a directory where you would like logs to be stored. Note: Blue Prism will require read and write permission to this directory and (for example in the case of a mapped network drive) this location will need to be accessible (ie the remote machine hosting the directory will need to be switched on) at the time you wish to perform the archiving.
  • You can use the "Save" button to save the chosen directory in the local PC's configuration file, so it will be remembered next time you archive. This saved directory will also be used for command-line archiving.
  • Select the logs that you would like to archive by checking leaf nodes in the right hand 'database' tree view.
  • Check your selection in the right-hand tree view and click the 'Archive' button (archiving progress is indicated by the progress bar).
  • Verify that your selected logs have newly appeared in the left hand 'archive' tree view.

Command Line Archiving

The archive operation can be performed on the command line, using the AutomateC program.

See the command line options help for a full description of the options available.

A scheduled archiving task which does not require an available running resource can be performed by calling the command line archive command within a Windows Scheduled Task.

For example, the following command would archive all logs older than six months in a single sign on environment:

AutomateC /archive /sso /age 6m

When archiving and restoring via the command-line, the Archive Folder selected via the interface in System Manager is used. There is also a command-line option to allow you to set this directly if necessary.

Automatic Archiving

Automatic archiving can be used to ensure that the logs never grow too big by performing an archive operation whenever any session logs exceed a specified age.

It causes a registered, running resource to check periodically throughout the day for any session logs that ended before a specified date/time and archive/delete them if such are found.

This is enabled and configured in System Manager, in the same location as the manual archiving.

Press the Switch to Automatic mode button to enable automatic mode. Options specific to this mode will be displayed.

  • Resource – Details the resource which should be responsible for running the automatic archiving background task.
  • Mode – Allows either archiving of the logs into a folder local to the resource which can be restored into the database at a later date, or simply deleting of the log data.
  • Archive Folder – The folder into which the resource should write the archived session logs. Note that this path must exist locally on the resource which will be running the archive operation, so that, eg. a folder of C:\logs\BluePrism\sessions must be available to the resource specified or the archive operation will fail.

    This field is not necessary if the configured mode indicates that the logs should be deleted directly.

  • Archive older than – Allows the age of the archiving to be specified. The archiving operation will attempt to archive any session logs which ended earlier than the specified age.

Incomplete debug sessions are archived later than other sessions with the same start date. Debug sessions that remain incomplete seven days after the start date are automatically terminated, setting the end date. These can then either be archived manually or automatically according to the end date and the value set in the archive later than option.

Restoring logs

Logs may only be restored manually to the database from the archive directory. Note that if you have Automatic Archiving enabled, and you restore logs older than the specified archiving age, they will be re-archived at the next available opportunity. In this scenario, you may want to disable Automatic Archiving temporarily.

The procedure is as follows:

  • Enter the Archiving area of System Manager and choose the correct 'Archive Folder', as described in the manual archiving section.
  • Select the logs that you would like to restore by ticking the appropriate entries in the left hand 'archive' tree.
  • Click the Restore button.
  • Verify that your selected logs have newly appeared in the right-hand 'database' tree view.

Session logs taken from other environments cannot be restored – the same processes, resources and users must exist for the the log to be restored correctly.

Viewing logs from the database and from archive

Should you wish to view any log from the database or from your archive, you may do so from System Manager.

  • Enter the Archiving area of System Manager, as described in the manual archiving section.
  • Find and select the log that you would like to view. Note that you do not need to tick the entry, only select it by clicking on the label of the entry. Entries in either tree can be selected.
  • Click either the View Log or View File button to view the selected log or file, respectively.

Releasing the archive lock

Should the archiving resource fail for some reason during an archive operation, it is possible that a lock may remain in the database preventing the resource from resuming archiving upon restart. The resource may report an error such as Archiving failed – This machine is already performing an archiving process. If this occurs then a System Administrator (or user with access to the Archiving screen) can manually release this lock using the option on the menu button.