I just discovered kopia after realizing that restic doesn’t do what I need it to do.
I’d like to backup data from an Ubuntu 20.04 VPS to OneDrive, via rclone. I assume that both restic and kopia do this adequately (with kopia offering compression as well).
My issue with restic is that if I want to restore a snapshot to the VPS filesystem
it downloads and overwrites all files, regardless of whether they have changed.
It appears that I could use kopia snapshot restore --skip-existing to avoid downloading and overwriting files that already exist. Is that correct? But what does “exist” mean? Is it an exact (file size and/or modified date and/or hash) match?
if there are new files in the restore destination (my VPS) directory that aren’t in the rclone:onedrive snapshot, they stay in the directory rather than being wiped out (such that the directory would be returned to the state that it was in when I took the snapshot).
Which mechanism (and flags) will handle this? It seems like sync-to rclone --delete handles this appropriately, but am I misunderstanding how sync-to works? It isn’t clear to me whether it can restore files like this or whether it only syncs between kopia repositories.
If I can’t use sync-to, then is there a flag for restore that will delete any extraneous/new files in the VPS destination?
Or should I just connect to the repo and use rclone sync for all of this? If that’s the case, then I’m in the same boat as with restic and will just test them both out to see how they differ
If you would run kopia --help-long, you would find all answers there.
Shortly sync-to is not about restoration, but about synchronization backup repository to another/other repositories (basically making extra duplicate of existing one backup)
That’s what help says about it:
When restoring to a target path that already has existing data, by default
the restore will attempt to overwrite, unless one or more of the following
flags has been set (to prevent overwrite of each type):
–no-overwrite-files --no-overwrite-directories --no-overwrite-symlinks
Mount works in the same way as on Unix based machines as well as in Windows. When you plugged some USB storage, mountdo NOT copy anything, it just represent external file system where user is responsible to choose what he want to copy.
Think about kopia's mounted volume in the same way as external USB flash drive, you are responsible what you want to copy from repository