Hide last authors
Outhman Moustaghfir 1.2 1 = Introduction =
2
Outhman Moustaghfir 9.1 3 "PurgeFiles" is a connector that allows administrators to delete all unused Files from directories by including all patterns desired in a format file.
Outhman Moustaghfir 1.2 4
Outhman Moustaghfir 5.1 5 The connector has been built in order to give more storage capacity to the next files that will be created.
Outhman Moustaghfir 1.2 6
7 Our connector's presentation is going to be described by details in 3 parts :
8
Outhman Moustaghfir 8.1 9 1. Parameters.
10 1. format (example)
Outhman Moustaghfir 1.2 11
Outhman Moustaghfir 8.1 12 [[image:purgefiles.PNG]]
13
Outhman Moustaghfir 1.3 14 = Parameters =
Outhman Moustaghfir 1.2 15
Outhman Moustaghfir 5.1 16 The only parameter used in the PurgeFiles connector is a 'format' file.
Outhman Moustaghfir 1.2 17
Outhman Moustaghfir 1.3 18 The format file contains the following parameters :
Outhman Moustaghfir 1.2 19
Outhman Moustaghfir 9.1 20 * iXPurgeJobFiles : XML root node containing all patterns nodes to be deleted, it has an attribute called '__stopTime__' that indicates a number of minutes to stop the PurgeJobFiles.
21 * iXPattern : a node that has one attribute '__Retention__' that refers to the number of days, if the file is older than the 'Retention' value, it will be deleted. The value of '__iXPattern__' should contain the pattern of job files target.
22 ** if the value of the pattern finishes by __'/'__, it means that we want to delete directories.
23 ** if not, the connector deletes the file that matches the pattern.  
Outhman Moustaghfir 1.2 24
Outhman Moustaghfir 8.1 25 [[image:purgejob1.PNG||height="390" width="434"]]
26
Outhman Moustaghfir 2.2 27 = Format (example) =
Outhman Moustaghfir 1.2 28
Outhman Moustaghfir 2.2 29 Below, we find an example showing a format file to delete job files with some patterns :
Outhman Moustaghfir 1.2 30
Outhman Moustaghfir 2.3 31 1. We want to delete all job files in a stopTime of 5 minutes.
32 1. The first pattern to be deleted is : '/jobs/*/*/*/*/logs/'  older than //**25 days**.// the connector in this case will delete all **__directories__** matching with the pattern.
33 1. The second pattern to be deleted is : '/jobs/2021/*/*/*/out/OUT.TRK ' older than **//17 days. //**The connector in this case will delete all __**files**__ matching with the pattern.
Outhman Moustaghfir 1.2 34
Outhman Moustaghfir 2.2 35 {{code language="XML"}}
36 <?xml version="1.0" encoding="UTF-8"?>
Outhman Moustaghfir 1.2 37
Outhman Moustaghfir 2.2 38 <iXDoc>
Achraf El Kari 5.2 39 <iXPurgeFiles stopTime = "5">
Outhman Moustaghfir 2.2 40 <iXPattern Retention = "25">/jobs/*/*/*/*/logs/</iXPattern>
Achraf El Kari 5.2 41 <iXPattern Retention = "17">/jobs/2021/*/*/*/out/OUT.TRK</iXPattern>
42 <iXPattern Retention = "12" absolute="true">C:/SERVER/Data/Logs/COM/FILE/*</iXPattern>
43 </iXPurgeFiles>
44
Outhman Moustaghfir 2.2 45 </iXDoc>
Outhman Moustaghfir 1.2 46
Outhman Moustaghfir 2.2 47 {{/code}}
Outhman Moustaghfir 1.2 48
49
50
51
Outhman Moustaghfir 1.3 52
53
Outhman Moustaghfir 2.2 54
55
Outhman Moustaghfir 8.1 56
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian