How to properly use the --flat option?

Hi all,

When I use kopia with a s3 bucket as a backend, there is no sharding (Sharding | Kopia) while when using the filesystem backend there is.

I would like to disable sharding when using the filesystem backend.

I tried to use the --flat option, starting from a empty backup folder:

kopia repository create filesystem --flat --path /backup_first

What I get is this:

root@ubuntu:/backup_first# ls
_lo  kopia.blobcfg.f  kopia.repository.f  q6b  s2f  xn0

I still get the folders for sharding and not a flat file only structure.

Do I misinterpret the --flat option?

Used kopia version: 0.12.1

Thanks a lot,

Besides the issue, that --flat doesn’t seem to work for you, what file system are you using? Sharding is rather vital for Kopia’s performance when performing searches and indexing. I don’t know of any regular file system, that will not perform terribly, when having to deal with thousands of files in a folder…

Happy new year!

I’m using a s3 bucket, so the repository is ‘flat’ anyway. But I do the kopia install and some things arround it with ansible. I’m testing the role with molecule and there the testing repository is located on the file system of a ubuntu container. I want to have this test as close as possible to the s3 setup and tried to use the --flat flag to get a ‘flat’ testing repository. It does not work.

I still don’t know what purpose the ‘–flat’ flag serves in the repository create context? What is it for?

Thanks a lot,

Happy new year to you as well!

I think the option --flat only applies to cloud based repos and that it’s deliberately disregarded on regular volumes. I dug a bit into the source code and found this explanation for it:

Ah I see. Thank you very much for your help!!