mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
* blob: support for custom blob store sharding
This is experimental.
The .shards file can reside in the root of any blob storage that uses
sharding (filesystem/sftp/webdav) and can specify rules for sharding.
{
"default": [3,2,1],
"overrides": [
{ "prefix": "p", "shards": [2,2] },
{ "prefix": "x", "shards": [1,1,1] }
],
"maxNonShardedLength": 2
}
With this in place we'll be later able to do resharding of the
repository to optimize get/put/list performance for both repositories
and caches.
* cli: command line tools to manipulate shards in a directory
22 lines
481 B
Go
22 lines
481 B
Go
package cli
|
|
|
|
type commandBlob struct {
|
|
delete commandBlobDelete
|
|
gc commandBlobGC
|
|
list commandBlobList
|
|
shards commandBlobShards
|
|
show commandBlobShow
|
|
stats commandBlobStats
|
|
}
|
|
|
|
func (c *commandBlob) setup(svc appServices, parent commandParent) {
|
|
cmd := parent.Command("blob", "Commands to manipulate BLOBs.").Hidden()
|
|
|
|
c.delete.setup(svc, cmd)
|
|
c.gc.setup(svc, cmd)
|
|
c.list.setup(svc, cmd)
|
|
c.shards.setup(svc, cmd)
|
|
c.show.setup(svc, cmd)
|
|
c.stats.setup(svc, cmd)
|
|
}
|