Create a Package Retention Policy

JFrog Platform Administration Documentation

Content Type
Administration / Platform
ft:sourceType
Paligo
  1. In the Live Artifactory instance, go to the Administration module, and select Artifactory | Retention Policies and click Create Policy.

    The Create New Retention Policy page appears.

    Create_retention_policy_updated.png
  2. Under Archiving Criteria, ensure that Archive Packages is selected and configure the following details:

    Field

    Description

    Policy Name

    Provide a unique and meaningful name for the policy.

    Schedule Execution

    Use a cron expression to set the schedule for the policy to execute.

    Example:

    schedule_execution_14oct21.png

    Max Execution Duration

    Enable and select the maximum duration that the policy has to execute. While this is useful for adhering to a strict archiving schedule, it can cause the archive policy to stop before completion.

    Active Policy

    Select the checkbox to make this an active policy. Clear the checkbox if you do not want the policy to run according to schedule.

    Packages

    Select Package Type

    Select the type of package that you want to archive.

    Include repositories

    From the drop-down, select one or more repositories to be included in the policy.

    Note

    • This setting is mandatory.

    • Cold Storage supports archiving packages that are stored in local repositories. If you want to archive packages in a remote repository, JFrog recommends moving those packages to a local repository before setting up the retention policy.

    Include Package

    If you want to archive a specific package in a repository, enter the package name here. Wildcard characters are permitted.

    Version

    If you want to archive a specific version of a package, enter the version number or name here. Wildcard characters are permitted.

    Age

    Deployed before

    Enable this setting if you want to archive packages based on when they were last deployed. For example, archive packages that were deployed a year ago.

    Last downloaded before

    Enable this setting if you want to archive packages based on when they were last downloaded. For example, select packages that were downloaded a year ago.

    Deletion Settings

    Skip Trash Can

    Enable this setting if you want to prevent transferring packages to the trash can repository when packages are archived to the Cold Instance. Enabling this setting will cause packages to be permanently deleted from the Live Instance after the archiving process is complete

    Purge Packages from Archive

    Specify if and when the archived packages should be permanently deleted:

    • Select Never to never delete archived packages.

    • Select After to delete the archived packages after a specific period that you define.

    Description

    If required, add a description for the policy.

  3. Click Preview to get an estimate on the number of artifacts that will be archived based on the settings selected for the policy.

  4. Click Save to save the policy. The policy will run on the scheduled date and time.

    The newly created policy appears in the Retention Policies list.

    cs_retention_policies_23sep2021.png