Edit the file cleanup service rules on Jitterbit private agents
Introduction
The Jitterbit File Cleanup Service runs on the server where a private agent is installed and running. The File Cleanup Service deletes log files, debug files, temporary files, transformation data, and success and failure files on the server based on the rules in the CleanupRules.xml
file.
Making changes to the File Cleanup Service rules will affect the disk space available on the server where the private agent is running and will need to be carefully considered. If you are experiencing disk space issues and want to reduce the footprint of files, we recommend changing all of the File Cleanup Service rules to save files only for 1 day.
Edit CleanupRules.xml
Though some of the File Cleanup Service rules can be updated manually in the jitterbit.conf
file within the [Filecleanup]
and [resultfiles]
sections (see editing the configuration file), all of the File Cleanup Service rules can be updated manually by following these steps:
-
Navigate to where the private agent is installed on the server. These are the default locations:
-
Windows:
C:\Program Files (x86)\Jitterbit Agent
orC:\Program Files\Jitterbit Agent
-
Linux:
/opt/jitterbit/
-
-
Open the
CleanupRules.xml
file using a text editor:<?xml version = "1.0"?> <!DOCTYPE CleanupRules SYSTEM "CleanupRules.dtd"> <CleanupRules> <FileCleanup> <CleanupRule> <!-- Note: Wildcard support for DirectoryPath is limited. Only one wildcard per path is supported. --> <!-- And wildcard must substitute one whole directory name. Invalid: folder1/abc*/folder3 --> <DirectoryPath SearchSubDirectory = "YES" >DataInterchange/file_store/*/result_files</DirectoryPath> <Pattern>*</Pattern> <FileAge NumDays = "14" Comparator = "GE"/> <FileSize Size = "0" Comparator = "GE"/> </CleanupRule> <CleanupRule> <DirectoryPath SearchSubDirectory = "YES" >DataInterchange/Temp/Debug</DirectoryPath> <Pattern>*</Pattern> <FileAge NumDays = "1" NumOfHours = "12" Comparator = "GE"/> <FileSize Size = "0" Comparator = "GE"/> </CleanupRule> <CleanupRule> <DirectoryPath SearchSubDirectory = "YES" >DataInterchange/Temp/LOG</DirectoryPath> <Pattern>*</Pattern> <FileAge NumDays = "7" Comparator = "GE"/> <FileSize Size = "0" Comparator = "GE"/> </CleanupRule> <!-- Remainder of file removed for clarity --> </FileCleanup> </CleanupRules>
-
Scroll down to the
<CleanupRule>
entry containing the specific directory path you need to edit. For example, as shown in the first highlighted line above, debug log files are located inDataInterchange/Temp/Debug
. The<FileAge>
element (second highlighted line) defines the file age. It accepts the following parameters:-
NumDays
: The maximum number of days (from 1 to 14) to save the specific files located in the directory before deleting them. -
NumOfHours
: The maximum number of hours to save the specific files located in the directory before deleting them. (Functional only with private agent version 10.83 / 11.21 or later.) -
Comparator
: How to compare a file's age with the values set byNumDays
andNumOfHours
:EQ
: Equal to.GE
: Greater than or equal to.GT
: Greater than.LE
: Less than or equal to.LT
: Less than.NE
: Not equal to.
In the example above, debug files are saved for 1 day and 12 hours before they are deleted. For example, to save the debug files for 3 days, you would change that line to
<FileAge NumDays = "3" Comparator = "GE"/>
, and either remove theNumOfHours
parameter or set it to0
. -
-
When all changes are completed, save the edited
CleanupRules.xml
file and close the file. -
Restart the Windows private agent or the Linux private agent.
Tip
Additional instructions on the rules for transferred files, transformation data, and success and failure files can be found at the end of the CleanupRules.xml
file.