Job Retention Policy



On This Page

Overview

The Job Retention Policy allows the user to configure deletion of old audit log entries from the database. Applicable job audit log's entries are deleted by the system job “Apply Job Retention Policies,” which runs every 4 hours.

Global Configurations

All settings can be set through the command line (--settingname=value) or through (SKYSYNC_settingname=value).

When using environment variables, replace the colon (:) with double underscore (__). So server:port could be set using an environment variable named SKYSYNC_server__port=value. The order of precedence before the database is online is command-line, then environment variables, then appSettings.json. However, once the license and database are online, the order of precedence changes to the license, then the database (Configuration table), then command-line, then environment variables, then appSettings.json.

  1. License first

  2. Then database

  3. Then command-line

  4. Then environment variables

  5. Then appSettings.json

 

Global Stop Policy Configuration

{   "data": {     "connection": "SERVER=(local);DATABASE=SkySyncV4;Integrated Security=SSPI",     "provider": "sqlserver",     "directory": "C:\\ProgramData\\SkySync\\v4",   },   "jobs": {     "retention": {       "duration" : {          "type": "days",          "count": 21       },       "purge_empty": true     }   },   "license": {     "activation_key": "{{license Key}}"     }   } }

 

Job Configuration

Options

Description

Default Value

Options

Description

Default Value

jobs:retention:duration:type

Retention type:

  • "all" – keep all records

  • "none" – removed all records

  • "number" - deletes records for execution exceeding count specified below

  • "days" - deleted records for execution older than count specified below

All

jobs:retention:duration:count

The number of days or executions to keep records for

21 for type="days";

50 for type="number"

jobs:retention:purge_empty

True/False flag specifying whenever to delete audit logs for executions which did not result in any file transfers

false

 

Example JSON

The following copy job's audit log will be purged of empty (no files were transferred) job executions and job execution count over 50.

POST v1/jobs

{ "name":"Simple Transfer Job with stop policy", "kind": "transfer", "transfer": { "transfer_type": "copy", "source": { "connection": { "id": "{{nfs_connection_id}}" }, "target": { "path": "/w/source" } }, "destination": { "connection": { "id": "{{cloud_connection_id}}" }, "target": { "path": "/w/destination" } } }, "schedule": { "mode": "auto" }, "retention": { "duration" : { "type": "number", "count": 50 }, "purge_empty": true } }

 

DryvIQ Migrate Version: 5.9.2
Release Date: December 17, 2024