-
Notifications
You must be signed in to change notification settings - Fork 594
Description
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:
- run
kopia repository disconnect(clean up any prior state) - create config file at
SOME_PATHwith connection options - 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.