Global policies

I made some changes to the default policy, through the interface on the kopia server.
When consulting the policies on the server (v0.7.2), I get this result:
kopia policy show --global
Policy for (global):

Retention:
  Annual snapshots:    0           (defined for this target)
  Monthly snapshots:   3           (defined for this target)
  Weekly snapshots:   12           (defined for this target)
  Daily snapshots:    60           (defined for this target)
  Hourly snapshots:    2           (defined for this target)
  Latest snapshots:   30           (defined for this target)

Files policy:
  Ignore cache directories:        true       (defined for this target)
  Ignore rules:
    /docker/containers/            (defined for this target)
    docker/containers/             (defined for this target)
    /docker/overlay2/              (defined for this target)
    docker/overlay2/               (defined for this target)
    /yum/                          (defined for this target)
    /rpm/                          (defined for this target)
    /postfix/                      (defined for this target)
  Read ignore rules from files:
    .kopiaignore                   (defined for this target)

Error handling policy:
  Ignore file read errors:        true       (defined for this target)
  Ignore directory read errors:   true       (defined for this target)

Scheduled snapshots:
  None

Compression:
  Compressor: "zstd" (defined for this target)
  Compress all files except the following extensions:
    .bz2                           (defined for this target)
    .xz                            (defined for this target)
    .zst                           (defined for this target)
  Compress files of all sizes.

When making the same query on a client (v0.7.2) machine, I have this other result:
kopia policy show --global
Policy for (global):

Retention:
  Annual snapshots:    3           (default)
  Monthly snapshots:  24           (default)
  Weekly snapshots:    4           (default)
  Daily snapshots:     7           (default)
  Hourly snapshots:   48           (default)
  Latest snapshots:   10           (default)

Files policy:
  Ignore cache directories:        true       (default)
  No ignore rules.
  Read ignore rules from files:
    .kopiaignore                   (default)

Error handling policy:
  Ignore file read errors:       false       (default)
  Ignore directory read errors:  false       (default)

Scheduled snapshots:
  None

Compression disabled.

In particular, the retention policy is not being followed, as defined globally.
How should I do so that global policies are followed for all hosts?

1 Like

That’s a good bug. I think the problem is that in a client-server situation client can only see their own policies (and not global).

Ok! I created a new issue

Uhh… this is a bit ugly, if you want to have your snapshots being encrypted and you’d have to have an existing snapshot from the remote client, prior to having KopiaUI be able to place a policy on it.

Since this bug has been open for some time and the issue on Github doesn’t seem to have gotten any attention, what’s the state with this bug - to me it’s rather significant.

The solution is in the works, but it’s more involved - we effectively need to add fine-grained ACL support. Coming in 0.8 but needs more time.

That’s actually quite a relief to know… thanks!