# Moogsoft Docs

## Archiver Command Reference

This is a reference for the archiving of Situations and alerts . The moog-archiver command line utility accepts the following arguments:

Argument
Input
Description
-a,--alert_filter <arg>
String: <filter name> Include all loose alerts that match the specified global alert filter. Does not apply to alerts within Situations that are being archived.
-b,--update_batch_size <arg>
Integer: <number of alerts/Situation rows> Defaults to 1000. Maximum number of alert/Situation rows to process at once during the export/deletion process. Increasing this value can speed up archiving but places more load on the database.
-d,--delimiter <arg>
String Defaults to comma "," . Delimiter to insert between values in the export file.
-e,--export
- Export the data to a file.
-f,--file_age <arg>
Integer: <number of days> Delete files from the default directory  /usr/local/archived  that are older than the specified number of days.
-g,--loglevel <arg>
DEBUG | INFO|WARN|FATAL Defaults to WARN. Specify the output verbosity.
-h,--help
- Display the  moog-archiver  utility syntax and option descriptions.
-i,--situation_filter <arg>
- Include all Situations that match the specified global alert filter.
-l,--loose_alert_age <arg>
Integer: <number of days>

Export data related to loose alerts older than the specified number of days. Defaults to 28 for a standard database or 395 if the Historic Database is enabled.

-m,--include_statistics
- Include the deletion of statistical data. Statistical data can only be deleted, not archived. Deletes statistical data from the active database whether database split is enabled or disabled.
-n,--statistics_age <arg>
Integer: <number of days> Delete statistical data older than the specified number of days. Defaults to 28 for a standard database or 395 if the Historic Database is enabled.
-o,--retain_open
- Only include data from Situations with Closed, Dormant or Superseded status. Cannot be used with the Situation filter  -i 
-p,--archive_path <arg>
String: <path> Defaults to  /usr/local/archived  . Destination path for the archived data.
-r,--remove
- Delete data from the database.
-s,--situation_age <arg>
Integer: <number of days> Include Situation data (and alerts within Situations) older than the specified number of days. Defaults to 28 for a standard database or 395 if the Historic Database is enabled.
-t,--loose_alerts_only
- Include loose alerts only. Cannot be used with  -i -o -s 
-y,--delay_time <arg>
Integer: <number of milliseconds> Length of the delay (in milliseconds) between each batch operation. Can be used to slow the speed of archiving to reduce load on the database. Defaults to 0.
-z,--id_batch_size <arg>
Integer: <number of rows>

Maximum number of rows to process per batch during the export/deletion process. Increasing this value can speed up archiving but places more load on the database. Defaults to 100.