> V1.1.0 > Commands > Plakar policy
Version v1.1.0

Beta Version

You're viewing documentation for version v1.1.0. Beta versions are subject to changes and may not represent the final stable release. Do not use in production environments.

policy

PLAKAR-POLICY(1)General Commands ManualPLAKAR-POLICY(1)

plakar-policyManage Plakar retention policies

plakar policysubcommand ...

The plakar policy command manages the retention policies for plakar-prune(1).

The configuration consists in a set of named entries, each of them describing a retention policy.

The subcommands are as follows:

name [option=value ...]
Create a new source entry identified by name. Additional parameters can be set by adding option=value parameters.
name
Remove the policy identified by name from the configuration.
name [option=value ...]
Set the option to value for the source identified by name. Multiple option/value pairs can be specified.
[-ini] [-json] [-yaml] [name ...]
Display the current sources configuration. -ini, -json and -yaml control the output format, which is YAML by default.
name [option ...]
Remove the option for the policy identified by name.

The available options as described in plakar-query(7): each option corresponds the similarly named flag.

The plakar-policy utility exits 0 on success, and >0 if an error occurs.

Create a policy ‘weekly’ that keeps one backup per week and discards backups older than three months:

$ plakar policy add weekly
$ plakar policy set weekly since='3 months'
$ plakar policy set weekly per-week=1

Prune snapshots accordingly to the ‘weekly’ policy:

$ plakar prune -policy weekly

plakar(1), plakar-prune(1)

September 11, 2025Plakar

Found a bug or mistake in the documentation? Create an issue on GitHub