Skip to main content
Skip table of contents

File Archiving

Feature

Zip and move any file(s) at a set interval.

Configuration

Executor components can be used to execute commands either remotely/locally and get the command output to be processed by a drool file to extract data. We can use this feature to execute automation like log file archival as well.

Step 1 - Create a Local Executor Component

We create a Local Executor component type.

Command details as below.

Command details as below.


cd ${SourceLocation} && find ./ -maxdepth 1 -mtime +${RetentionDays} -type f -name "${RegexPattern}" -exec tar --remove-files -czf {}.tar.gz {} \; -exec mv {}.tar.gz ${TargetLocation}/ \;

The highlighted values are the variables we passed as References when we do the deployment.

CODE
SourceLocation      :   Source location where files generated  
RetentionDays       :   Number of days to retain files on source location       
RegexPattern        :   Regular Expression to identify the file names.       
TargetLocation      :   Target location where files backed up

Ex:

CODE
SourceLocation      :   /siebel/Siebel/ai/applicationcontainer_external/logs  
RetentionDays       :   14       
RegexPattern        :   *.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].log       
TargetLocation      :   /siebel/bfs//AILogsBKP/AINode4

Step 2- Deploy the component to the required node.

The component can be deployed to any of the Engines as an Executor type component and run on your preferred interval.

Component: Engine

Feature Availability: 8.6.0 or later

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.