Changing repository type

There are two types of repositories: cloud-based (s3, gcs, azure, b2) and non-cloud based (everything else).

Cloud repositories use simple flat structure without subdirectories and perform simple writes because underlying providers have horizontal scalability and atomic writes.

Non cloud repositories use sharded subdirectories and rely on temporary files and rename operations to ensure atomic writes.

You can copy data within each type freely (for example move data from b2 bucket to azure container) and the repository will work fine. Moving from file system to sftp or vice versa will also work.

Now to move between cloud and non cloud you can use kopia repository sync-to command from a connected repository. This will move data using blob storage providers inside Kopia which will perform necessary changes to either flatten or shard the repository.