policy set

$ kopia policy set [target]

Set snapshot policy for a single directory, user@host or a global policy.

Flag Short Default Help
--action-command-mode essential Action command mode
--action-command-timeout 5m Max time allowed for a action to run in seconds
--add-dot-ignore List of paths to add to the dot-ignore list
--add-ignore List of paths to add to the ignore list
--add-never-compress List of extensions to add to the never compress list
--add-only-compress List of extensions to add to the only-compress list
--after-folder-action - Path to after-folder action command (‘none’ to remove)
--after-snapshot-root-action - Path to after-snapshot-root action command (‘none’ to remove or ‘inherit’)
--before-folder-action - Path to before-folder action command (‘none’ to remove)
--before-snapshot-root-action - Path to before-snapshot-root action command (‘none’ to remove or ‘inherit’)
--[no-]clear-dot-ignore false Clear list of paths in the dot-ignore list
--[no-]clear-ignore false Clear list of paths in the ignore list
--[no-]clear-never-compress false Clear list of extensions in the never compress list
--[no-]clear-only-compress false Clear list of extensions in the only-compress list
--compression Compression algorithm
--compression-max-size Max size of file to attempt compression for
--compression-min-size Min size of file to attempt compression for
--[no-]global false Set global policy
--ignore-cache-dirs Ignore cache directories (‘true’, ‘false’, ‘inherit’)
--ignore-dir-errors Ignore errors reading directories while traversing (‘true’, ‘false’, ‘inherit
--ignore-file-errors Ignore errors reading files while traversing (‘true’, ‘false’, ‘inherit’)
--ignore-unknown-types Ignore unknown entry types in directories (‘true’, ‘false’, ‘inherit
--inherit Enable or disable inheriting policies from the parent
--keep-annual Number of most-recent annual backups to keep per source (or ‘inherit’)
--keep-daily Number of most-recent daily backups to keep per source (or ‘inherit’)
--keep-hourly Number of most-recent hourly backups to keep per source (or ‘inherit’)
--keep-latest Number of most recent backups to keep per source (or ‘inherit’)
--keep-monthly Number of most-recent monthly backups to keep per source (or ‘inherit’)
--keep-weekly Number of most-recent weekly backups to keep per source (or ‘inherit’)
--[no-]manual false Only create snapshots manually
--max-file-size Exclude files above given size
--one-file-system Stay in parent filesystem when finding files (‘true’, ‘false’, ‘inherit’)
--[no-]persist-action-script false Persist action script
--remove-dot-ignore List of paths to remove from the dot-ignore list
--remove-ignore List of paths to remove from the ignore list
--remove-never-compress List of extensions to remove from the never compress list
--remove-only-compress List of extensions to remove from the only-compress list
--snapshot-interval Interval between snapshots
--snapshot-time Times of day when to take snapshot (HH:mm)
Argument Help
target Target of a policy (‘global’,‘user@host’,'@host’) or a path
Last modified January 1, 0001