Relative path support (e.g. rsync -R)

I am new to Kopia so maybe I don’t fully understand how it is supposed to work, but let’s say I want to snapshot a directory but preserve the parent directory structure in the snapshot, is that possible?

For example, /mnt/a/b/c, I want to snapshot all of the files in the directory “c” but have them appear as “/b/c”, which would be rsync -R /mnt/a/./b/c $DEST, or for kopia, maybe kopia snapshot /mnt/a/./b/c ?

Thanks!

Take a look at .kopiaignore. (here is discussion regarding ignore patterns). Shortly, kopia supports subset of .gitignore syntax, so using it, you can start snapshot from ./b where you can place .kopiaignore file that will direct kopia to ignore everything except ./b/c so you will end up with ./b/c only in snapshot

Thanks for the tip! It works!

[.kopiaignore]
*
!/b
!/b/**

So, the directory “b” has to be included, and then also the files within. Documenting here in case it is helpful to others!