Compress Files
AMPS provides the following module for compressing files. Use this action to compress error log files that are no longer needed. AMPS loads this module by default.
This action compresses files that match an arbitrary pattern. The original file is removed once the file is compressed. If the pattern is not specified carefully, this action can compress files that contain important data, are required for AMPS, or are required by the operating system.
This action cannot be used to safely compress journal files (also known as transaction log files). Use the actions described in Manage Transaction Log Journal Files for these files.
Module Name | Does |
---|---|
| Compresses files that match the specified pattern that are older than the specified age. This action accepts an arbitrary pattern, and compresses files that match that pattern. While AMPS attempts to protect against deleting journal files, using a pattern that compresses files that are critical for AMPS, for the application, or for the operating system may result in loss of data. The module does not recurse into directories. It skips open files. The module does not compress AMPS journals (that is, files that end with a The commands to compress files are executed with the current permissions of the AMPS process. |
This module requires an Age
parameter that specifies the age of the files to remove, as determined by the update to the file. This module also requires a Pattern
parameter that specifies a pattern for locating files to remove.
Parameter | Description |
---|---|
| Specifies the age of files to process. The module removes any file older than the specified For example, when the There is no default for this parameter. |
| Specifies the pattern for files to remove. The module removes any files that match the specified This parameter is interpreted as a Unix shell globbing pattern. It is not interpreted as a regular expression. As with other parameters that use the file system, when the pattern specified is a relative path, the parameter is interpreted relative to the current working directory of the AMPS process. When the pattern specified is an absolute path, AMPS uses the absolute path. There is no default for this parameter. |
| Specifies the number of files that meet the When this parameter is specified, AMPS will compress files matching the criteria, starting with the oldest files, and stop when the number of remaining files is the number specified in this parameter. There is no default for this parameter. When both |
| Specifies the maximum number of files that meet the AMPS will compress files matching the criteria, starting with the oldest files, and stop when the number of files specified in this parameter have been compressed. There is no default for this parameter. When both |
This module does not add any variables to the AMPS context.
Last updated