Skip to content

Declarative configuration #2432

@tecosaur

Description

@tecosaur

Hello,

I'm trying to write a NixOS service for Kopia, and hoping I could get some advice here on it. At the moment, I'm thinking of storing the quick connect token with the password, and then having separate parameters for other connection options. Then the "activation script" (runs once on enabling) can execute these steps:

  1. run kopia repository disconnect (clean up any prior state)
  2. create config file at SOME_PATH with connection options
  3. run kopia repository connect --config-file=$SOME_PATH from-config --token-file=/run/secrets/kopia-token

I haven't tried this, but from the docs this looks like it could work. For actually performing backups, some systemd services and timers with kopia snapshot --config-file=$SOME_PATH seem like all that's required.

One thing I haven't got any idea about is the policy. I see that you can get the current policy as JSON with kopia policy show --json, but I don't see any easy way to import a policy/set it declaratively? Advice here would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions