I want to use Kopia to synchronize a directory on my local hard drive with a cloud storage. I.e. only ONE version of the latest snapshot should be available on the cloud (no other old snapshots should be archived).
How to set up the retention policy of the snapshot for this simple case? Do all retention fields have to be filled with number zero?
(This is assuming you’re using KopiaUI, and that your repository (backup destination) is located on the cloud storage you were referring to, so Kopia is backing up directly to the cloud)
You’ll want to set “latest” to “1” and everything else to “0” just to make sure those other fields aren’t being inherited from a global policy, which, by default has those fields populated with fairly standard settings. Now every time your backup runs, your previous backup will be deleted, so you’ll only have the most recent snapshot in the repository.
BUT, unless you have a special use case I would recommend keeping more than just your latest snapshot. In your current setup, if you change or delete a file you needed, then you’re in a race against the next scheduled Kopia snapshot to go retrieve said file from your backup (ignoring the concept of maintenance for simplicity-sake). Once Kopia takes a new snapshot, your old one holding that deleted file will be erased. You’re basically using a backup tool as a non-realtime sync tool.
In most situations the additional snapshots will use a very small amount of additional data compared to just having one. Kopia uses de-duplication and only backs up changes to the data already in the repository with each additional snapshot. There are also options for compression that are pretty helpful in shrinking the size of your backups. If you’re interested, you can create a repository on a local drive and monitor it over time to see how the data grows with your specific use case.