But there is one thing I don’t understand: How the hell do policies work? And even more: How do intervals work?
And what does this even mean? Well, I saw the help:
--snapshot-interval=SNAPSHOT-INTERVAL ...
Interval between snapshots
But what does that mean? Will kopia create a systemd timer or cronjob for me? A daemon is not running on my Ubuntu server, as far as I can tell.
And where is all that saved? If I do
kopia --config-file /root/.config/kopia/local.config policy set --global --snapshot-interval 1h
nothing is saved in the local.config.
My goal is to automate that process for some of my servers and I am still not sure, whether I should ansible run a few cli commands or whether I should create a config using a template.
I’d personally go with CLI commands because it feels saver than messing around with undocumented repository.config and repository.config.kopia-password files.
But beware that Kopia overrides the configuration file when running kopia repo connect on a already connected repository. You might want to create a check for that in your playbook.