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 an 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
--enable-volume-shadow-copy Enable Volume Shadow Copy snapshots (’never’, ‘always’, ‘when-available’, ‘inherit’)
--[no-]global false Select the 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-identical-snapshots Do not save identical snapshots (or ‘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’)
--log-dir-ignored Log detail when a directory is ignored (or ‘inherit’)
--log-dir-snapshotted Log detail when a directory is snapshotted (or ‘inherit’)
--log-entry-cache-hit Log detail on entry cache hit (or ‘inherit’)
--log-entry-cache-miss Log detail on entry cache miss (or ‘inherit’)
--log-entry-ignored Log detail when an entry is ignored (or ‘inherit’)
--log-entry-snapshotted Log detail when an entry is snapshotted (or ‘inherit’)
--[no-]manual false Only create snapshots manually
--max-file-size Exclude files above given size
--max-parallel-file-reads Maximum number of parallel file reads
--max-parallel-snapshots Maximum number of parallel snapshots (server, KopiaUI only)
--metadata-compression Metadata Compression algorithm
--one-file-system Stay in parent filesystem when finding files (’true’, ‘false’, ‘inherit’)
--parallel-upload-above-size-mib Use parallel uploads above size
--[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
--run-missed Run missed time-of-day or cron snapshots (’true’, ‘false’, ‘inherit’)
--snapshot-interval Interval between snapshots
--snapshot-time Comma-separated times of day when to take snapshot (HH:mm,HH:mm,…) or ‘inherit’ to remove override
--snapshot-time-crontab Semicolon-separated crontab-compatible expressions (or ‘inherit’)
--splitter Splitter algorithm override
Argument Help
target Select a particular policy (‘user@host’,’@host’,‘user@host:path’ or a local path). Use –global to target the global policy.