chore(general): clean nits (#5313)

- make benchmarking params uint
- prevent error in compression benchmarking
- lint on Windows and address linter warnings
- upgrade golang.org/x/exp
- upgrade github.com/cncf/xds/go
- upgrade github.com/dustinkirkland/golang-petname
- direct users to forum
- add warning about _recovery recipes_
This commit is contained in:
Julio López
2026-04-16 21:41:39 -07:00
committed by GitHub
parent 5bedcd5057
commit d1e5c1d8a0
23 changed files with 80 additions and 72 deletions

View File

@@ -52,6 +52,9 @@ jobs:
sarif_file: govulncheck.sarif
- name: Lint
run: make lint
- name: Lint Windows
if: ${{ contains(matrix.os, 'ubuntu') }}
run: make lint-windows
- name: Check Locks
run: make check-locks
- name: Prettier

View File

@@ -87,13 +87,17 @@ endif
lint-and-log: $(linter)
$(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags) | tee .linterr.txt
lint-all: $(linter)
lint-windows: $(linter)
GOOS=windows GOARCH=amd64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
lint-darwin: $(linter)
GOOS=darwin GOARCH=amd64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=darwin GOARCH=arm64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
lint-all: $(linter) lint-windows lint-darwin
GOOS=linux GOARCH=amd64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=linux GOARCH=arm64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=linux GOARCH=arm $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=darwin GOARCH=amd64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=darwin GOARCH=arm64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=openbsd GOARCH=amd64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)
GOOS=freebsd GOARCH=amd64 $(linter) --timeout $(LINTER_DEADLINE) run $(linter_flags)

View File

@@ -3,7 +3,6 @@ Kopia
![Kopia](icons/kopia.svg)
[![Build Status](https://github.com/kopia/kopia/workflows/Build/badge.svg)](https://github.com/kopia/kopia/actions?query=workflow%3ABuild)
[![Slack](https://img.shields.io/badge/discuss-slack-blue.svg)](https://slack.kopia.io/)
[![GoDoc](https://godoc.org/github.com/kopia/kopia/repo?status.svg)](https://godoc.org/github.com/kopia/kopia/repo)
[![Coverage Status](https://codecov.io/gh/kopia/kopia/branch/master/graph/badge.svg?token=CRK4RMRFSH)](https://codecov.io/gh/kopia/kopia)[![Go Report Card](https://goreportcard.com/badge/github.com/kopia/kopia)](https://goreportcard.com/report/github.com/kopia/kopia)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
@@ -58,22 +57,22 @@ Using Kopia via graphical user interface (note: the video is of an older version
Getting Started
---
See [Kopia Documentation](https://kopia.io/docs/) for more information.
Building Kopia
---
See [Build Infrastructure](BUILD.md) for more information on building Kopia and working with the source code.
See [Kopia Documentation](https://kopia.io/docs/) for more information. Also check out the [users forum](https://kopia.discourse.group).
Licensing
---
Kopia is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.
Building Kopia
---
See [Build Infrastructure](BUILD.md) for more information on building Kopia and working with the source code.
Contribution Guidelines
---
Kopia is open source and contributions are welcome. For more information on how to contribute see the [Contribution Guidelines](https://kopia.io/docs/contribution-guidelines/).
Kopia is open source. For more information see the [Contribution Guidelines](https://kopia.io/docs/contribution-guidelines/).
Reporting Security Issues
---
If you find a security issue you'd like to disclose privately, please contact `security@kopia.io` or via direct message to maintainers on [Slack](https://slack.kopia.io).
If you find a security issue you'd like to disclose privately, please contact `security@kopia.io`.
[![Netlify Status](https://api.netlify.com/api/v1/badges/6b5c1fe4-a0da-4e7e-939b-ff1105251985/deploy-status)](https://app.netlify.com/sites/kopia/deploys)

View File

@@ -31,7 +31,11 @@ type cryptoBenchResult struct {
throughput float64
}
func runInParallelNoInputNoResult(n int, run func()) {
func runInParallelNoInputNoResult(n uint, run func()) {
if n == 0 {
return
}
dummyArgs := make([]int, n)
runInParallelNoResult(dummyArgs, func(_ int) {
@@ -39,7 +43,13 @@ func runInParallelNoInputNoResult(n int, run func()) {
})
}
func runInParallelNoInput[T any](n int, run func() T) T {
func runInParallelNoInput[T any](n uint, run func() T) T {
if n == 0 {
var zero T
return zero
}
dummyArgs := make([]int, n)
return runInParallel(dummyArgs, func(_ int) T {

View File

@@ -16,10 +16,10 @@
type commandBenchmarkCrypto struct {
blockSize atunits.Base2Bytes
repeat int
repeat uint
deprecatedAlgorithms bool
optionPrint bool
parallel int
parallel uint
out textOutput
}
@@ -27,9 +27,9 @@ type commandBenchmarkCrypto struct {
func (c *commandBenchmarkCrypto) setup(svc appServices, parent commandParent) {
cmd := parent.Command("crypto", "Run combined hash and encryption benchmarks")
cmd.Flag("block-size", "Size of a block to encrypt").Default("1MB").BytesVar(&c.blockSize)
cmd.Flag("repeat", "Number of repetitions").Default("100").IntVar(&c.repeat)
cmd.Flag("repeat", "Number of repetitions").Default("100").UintVar(&c.repeat)
cmd.Flag("deprecated", "Include deprecated algorithms").BoolVar(&c.deprecatedAlgorithms)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").IntVar(&c.parallel)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").UintVar(&c.parallel)
cmd.Flag("print-options", "Print out options usable for repository creation").BoolVar(&c.optionPrint)
cmd.Action(svc.noRepositoryAction(c.run))
c.out.setup(svc)

View File

@@ -16,9 +16,9 @@
type commandBenchmarkEcc struct {
blockSize atunits.Base2Bytes
repeat int
repeat uint
optionPrint bool
parallel int
parallel uint
out textOutput
}
@@ -26,8 +26,8 @@ type commandBenchmarkEcc struct {
func (c *commandBenchmarkEcc) setup(svc appServices, parent commandParent) {
cmd := parent.Command("ecc", "Run ECC benchmarks")
cmd.Flag("block-size", "Size of a block to encrypt").Default("10MB").BytesVar(&c.blockSize)
cmd.Flag("repeat", "Number of repetitions").Default("100").IntVar(&c.repeat)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").IntVar(&c.parallel)
cmd.Flag("repeat", "Number of repetitions").Default("100").UintVar(&c.repeat)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").UintVar(&c.parallel)
cmd.Flag("print-options", "Print out options usable for repository creation").BoolVar(&c.optionPrint)
cmd.Action(svc.noRepositoryAction(c.run))
c.out.setup(svc)

View File

@@ -16,10 +16,10 @@
type commandBenchmarkEncryption struct {
blockSize atunits.Base2Bytes
repeat int
repeat uint
deprecatedAlgorithms bool
optionPrint bool
parallel int
parallel uint
out textOutput
}
@@ -27,9 +27,9 @@ type commandBenchmarkEncryption struct {
func (c *commandBenchmarkEncryption) setup(svc appServices, parent commandParent) {
cmd := parent.Command("encryption", "Run encryption benchmarks")
cmd.Flag("block-size", "Size of a block to encrypt").Default("1MB").BytesVar(&c.blockSize)
cmd.Flag("repeat", "Number of repetitions").Default("1000").IntVar(&c.repeat)
cmd.Flag("repeat", "Number of repetitions").Default("1000").UintVar(&c.repeat)
cmd.Flag("deprecated", "Include deprecated algorithms").BoolVar(&c.deprecatedAlgorithms)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").IntVar(&c.parallel)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").UintVar(&c.parallel)
cmd.Flag("print-options", "Print out options usable for repository creation").BoolVar(&c.optionPrint)
cmd.Action(svc.noRepositoryAction(c.run))
c.out.setup(svc)

View File

@@ -15,9 +15,9 @@
type commandBenchmarkHashing struct {
blockSize atunits.Base2Bytes
repeat int
repeat uint
optionPrint bool
parallel int
parallel uint
out textOutput
}
@@ -25,8 +25,8 @@ type commandBenchmarkHashing struct {
func (c *commandBenchmarkHashing) setup(svc appServices, parent commandParent) {
cmd := parent.Command("hashing", "Run hashing function benchmarks").Alias("hash")
cmd.Flag("block-size", "Size of a block to hash").Default("1MB").BytesVar(&c.blockSize)
cmd.Flag("repeat", "Number of repetitions").Default("100").IntVar(&c.repeat)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").IntVar(&c.parallel)
cmd.Flag("repeat", "Number of repetitions").Default("100").UintVar(&c.repeat)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").UintVar(&c.parallel)
cmd.Flag("print-options", "Print out options usable for repository creation").BoolVar(&c.optionPrint)
cmd.Action(svc.noRepositoryAction(c.run))
c.out.setup(svc)

View File

@@ -19,9 +19,9 @@
type commandBenchmarkSplitters struct {
randSeed int64
blockSize atunits.Base2Bytes
blockCount int
blockCount uint
printOption bool
parallel int
parallel uint
out textOutput
}
@@ -31,9 +31,9 @@ func (c *commandBenchmarkSplitters) setup(svc appServices, parent commandParent)
cmd.Flag("rand-seed", "Random seed").Default("42").Int64Var(&c.randSeed)
cmd.Flag("data-size", "Size of a data to split").Default("32MB").BytesVar(&c.blockSize)
cmd.Flag("block-count", "Number of data blocks to split").Default("16").IntVar(&c.blockCount)
cmd.Flag("block-count", "Number of data blocks to split").Default("16").UintVar(&c.blockCount)
cmd.Flag("print-options", "Print out the fastest dynamic splitter option").BoolVar(&c.printOption)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").IntVar(&c.parallel)
cmd.Flag("parallel", "Number of parallel goroutines").Default("1").UintVar(&c.parallel)
cmd.Action(svc.noRepositoryAction(c.run))

View File

@@ -25,7 +25,6 @@ func trailingSeparator(fsd *filesystemDirectory) string {
fsd.prefix == `\\?\GLOBALROOT\Device\` &&
strings.HasPrefix(fsd.Name(), "HarddiskVolumeShadowCopy") &&
!strings.HasSuffix(fsd.Name(), separatorStr) {
return separatorStr
}

6
go.mod
View File

@@ -15,7 +15,7 @@ require (
github.com/chromedp/cdproto v0.0.0-20250724212937-08a3db8b4327
github.com/chromedp/chromedp v0.14.2
github.com/coreos/go-systemd/v22 v22.7.0
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
github.com/dustinkirkland/golang-petname v0.0.0-20260215035315-f0c533e9ce9b
github.com/edsrzf/mmap-go v1.2.0
github.com/fatih/color v1.19.0
github.com/foomo/htpasswd v0.0.0-20200116085101-e3a90e78da9c
@@ -57,7 +57,7 @@ require (
go.opentelemetry.io/otel/trace v1.43.0
go.uber.org/zap v1.27.1
golang.org/x/crypto v0.50.0
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
golang.org/x/mod v0.35.0
golang.org/x/net v0.53.0
golang.org/x/oauth2 v0.36.0
@@ -90,7 +90,7 @@ require (
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chromedp/sysutil v1.1.0 // indirect
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
github.com/danieljoos/wincred v1.2.3 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect

12
go.sum
View File

@@ -68,8 +68,8 @@ github.com/chromedp/sysutil v1.1.0/go.mod h1:WiThHUdltqCNKGc4gaU50XgYjwjYIhKWoHG
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 h1:6xNmx7iTtyBRev0+D/Tv1FZd4SCg8axKApyNyRsAt/w=
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5/go.mod h1:KdCmV+x/BuvyMxRnYBlmVaq4OLiKW6iRQfvC62cvdkI=
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 h1:aBangftG7EVZoUb69Os8IaYg++6uMOdKK83QtkkvJik=
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7XnJtbKlf1HP8AjxZZyzxMmc+Lq5GjlU4=
github.com/coreos/go-systemd/v22 v22.7.0 h1:LAEzFkke61DFROc7zNLX/WA2i5J8gYqe0rSj9KI28KA=
github.com/coreos/go-systemd/v22 v22.7.0/go.mod h1:xNUYtjHu2EDXbsxz1i41wouACIwT7Ybq9o0BQhMwD0w=
github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ=
@@ -81,8 +81,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 h1:90Ly+6UfUypEF6vvvW5rQIv9opIL8CbmW9FT20LDQoY=
github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8=
github.com/dustinkirkland/golang-petname v0.0.0-20260215035315-f0c533e9ce9b h1:qZ21OofI7zneC9dOEqul4FmIWz/YjJJMrf6fL7jrFYQ=
github.com/dustinkirkland/golang-petname v0.0.0-20260215035315-f0c533e9ce9b/go.mod h1:8AuBTZBRSFqEYBPYULd+NN474/zZBLP+6WeT5S9xlAc=
github.com/edsrzf/mmap-go v1.2.0 h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84=
github.com/edsrzf/mmap-go v1.2.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
github.com/envoyproxy/go-control-plane v0.14.0 h1:hbG2kr4RuFj222B6+7T83thSPqLjwBIfQawTkC++2HA=
@@ -311,8 +311,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI=
golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f h1:W3F4c+6OLc6H2lb//N1q4WpJkhzJCK5J6kUi1NTVXfM=
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f/go.mod h1:J1xhfL/vlindoeF/aINzNzt2Bket5bjo9sdOYzOsU80=
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

View File

@@ -61,7 +61,7 @@ func netUseMount(ctx context.Context, driveLetter, webdavURL string) (string, er
// colon.
s := bufio.NewScanner(strings.NewReader(out))
for s.Scan() {
for _, word := range strings.Split(s.Text(), " ") {
for word := range strings.SplitSeq(s.Text(), " ") {
if isWindowsDrive(word) {
return word, nil
}

View File

@@ -11,7 +11,7 @@
"github.com/kopia/kopia/repo/blob"
)
func (fs *fsStorage) GetCapacity(ctx context.Context) (blob.Capacity, error) {
func (fs *fsStorage) GetCapacity(_ context.Context) (blob.Capacity, error) {
var c blob.Capacity
pathPtr, err := windows.UTF16PtrFromString(fs.RootPath)

View File

@@ -99,6 +99,10 @@ func BenchmarkCompressor(b *testing.B) {
var sortedNames []Name
for id := range ByName {
if !IsSupported(id) {
continue
}
sortedNames = append(sortedNames, id)
}

View File

@@ -31,9 +31,11 @@ func (c *diskCommittedContentIndexCache) mmapFile(ctx context.Context, filename
retryCount := 0
for err != nil && retryCount < maxRetries {
retryCount++
contentlog.Log2(ctx, c.log, "retry unable to mmap.Open()",
logparam.Int("retryCount", retryCount),
logparam.Error("err", err))
time.Sleep(nextDelay)
nextDelay *= 2
@@ -54,9 +56,11 @@ func (c *diskCommittedContentIndexCache) mmapFile(ctx context.Context, filename
if err2 := mm.Unmap(); err2 != nil {
return errors.Wrapf(err2, "error unmapping index %v", filename)
}
if err2 := f.Close(); err2 != nil {
return errors.Wrapf(err2, "error closing index %v", filename)
}
return nil
}, nil
}

View File

@@ -11,7 +11,7 @@ func bytesToContentID(b []byte) ID {
}
if len(b) > maxIDLength+1 {
panic(fmt.Sprintln("Content ID byte slice is longer than the maximum supported ID:", len(b)))
panic(fmt.Sprintf("Content ID byte slice is longer than the maximum supported ID: %d", len(b)))
}
var id ID

View File

@@ -13,13 +13,10 @@ linkTitle = "Kopia"
<a class="btn btn-lg btn-secondary mr-3 mb-4" href="/docs/installation/">
Download
</a>
<br/>
<a class="btn btn-lg btn-warning mr-3 mb-4" href="https://kopia.discourse.group">
User Support Forum
</a>
<a class="btn btn-lg btn-success mr-3 mb-4" href="https://slack.kopia.io">
Developer Discussion
User Forum
</a>
<br/>
<p class="font-weight-bold h3 mt-5">Encrypted, Compressed, and Deduplicated Backups Using the Cloud Storage You Pick.</p>
<p>Supports GUI and CLI on Windows, macOS and Linux.</p>
</div>
@@ -52,14 +49,11 @@ View a recorded demo of Kopia using Google Cloud Storage with pluggable encrypti
With a secure and scalable architecture, **Kopia** can back up everything from small laptops to large servers.
{{% /blocks/feature %}}
{{% blocks/feature icon="fab fa-github" title="Contributions Welcome!" url="https://github.com/kopia/kopia/blob/master/GOVERNANCE.md" %}}
We use a [Pull Request](https://github.com/kopia/kopia/pulls) contributions workflow on GitHub. New contributors and bug reports are always welcome!
{{% blocks/feature icon="fas fa-comments" title="Join The Conversation" %}}
Join the [user forum](https://kopia.discourse.group) to get started with using **Kopia**, discuss features and issues.
{{% /blocks/feature %}}
{{% blocks/feature icon="fab fa-slack" title="Join The Conversation" %}}
Find us on [Slack](https://slack.kopia.io) to get started with using **Kopia**, discuss features and issues, meet the team, and more.
{{% blocks/feature icon="fab fa-github" title="Contributing" url="https://github.com/kopia/kopia/blob/master/GOVERNANCE.md" %}}
{{% /blocks/feature %}}

View File

@@ -253,7 +253,7 @@ kopia policy set <target_dir> --after-folder-action "powershell -WindowStyle Hi
Those are just some initial ideas, we're certain more interesting types of actions will be developed using this mechanism, including LVM snapshots, BTRFS Snapshots, notifications and more.
If you have ideas for extending this mechanism, definitely [file an Issue on Github](https://github.com/kopia/kopia/issues).
If you have ideas for extending this mechanism, please [file an Issue on Github](https://github.com/kopia/kopia/issues).
If you develop a useful action script that you'd like to share with the community, we encourage you
to do so by sending us a pull request to add to this web page or you can put them in your own repository and we'll be happy to link it from here.

View File

@@ -80,13 +80,13 @@ Repeating 100 times per compression method (total 12.5 MiB).
16. zstd-best-compression 25.1 KiB 19.3 MiB/s 882 99.3 MiB
```
While s2 uses significantly less memory in this case, pgzip's numbers seem indifferent to the input size. [Turns out](https://github.com/klauspost/pgzip/issues/44), pgzip has different memory usage logic. It would quickly allocate necessary memory and plateau, which s2 is more on a linear fashion. Here is rough graph is demonstrate the difference:
While s2 uses significantly less memory in this case, pgzip's numbers seem indifferent to the input size. [Turns out](https://github.com/klauspost/pgzip/issues/44), pgzip has different memory usage logic. It would quickly allocate necessary memory and plateau, which s2 exhibits more of a linear growth. The graph below illustrates the difference.
![s2 vs pgzip](s2_vs_pgzip.svg)
Therefore, if your backup target is small, and memory is extremely restricted, s2 might be necessary. Otherwise, all algorithms are valid candidates.
Note: Newer Kopia versions no longer support reading contents that were compressed with the deprecated LZ4 algorithm. If your repository contains data written with LZ4, you must migrate it first using a Kopia version that still supports LZ4—for example by restoring the affected snapshots and/or repacking the repository with one of the currently supported compression algorithms—before upgrading.
Note: Newer Kopia versions no longer support reading contents that were compressed with the deprecated LZ4 algorithm. If your repository contains data written with LZ4, you must migrate it first using a Kopia version that still supports LZ4—for example by restoring the affected snapshots and/or repacking the repository with one of the currently supported compression algorithms—before upgrading.
### Minimum file size and extensions to compress

View File

@@ -52,6 +52,6 @@ There are few tips to try, which are generally safe to try:
4. If a repository cant be opened but was working recently and maintenance has not run yet, it may be helpful to try to remove (or stash away) the most recently-written index files whose names start with `x` in the reverse timestamp order one by one until the issue is fixed. This will effectively roll back the repository writes to a prior state. Exercise caution when removing the files.
5. If the steps above do not help, report your issue on https://kopia.discourse.group or https://slack.kopia.io. Kopia has many low-level data recovery tools, but they should not be used by end users without guidance from developers.
5. If the steps above do not help, report your issue on https://kopia.discourse.group.
> NOTE: Since all data corruption cases are unique, its generally not recommended to attempt fixes recommended to other users even for possibly similar issues, since the particular fix method may not be applicable.
> NOTE: While Kopia has many low-level data recovery tools, its generally not recommended to attempt fixes recommended to other users even for possibly similar issues, since all data corruption cases are unique and the particular fix method may not be applicable. Following those methods may damage the repository further and make the data completely unrecoverable.

View File

@@ -117,16 +117,11 @@ no = 'Sorry to hear that. Please <a href="https://github.com/kopia/kopia/issues/
url = "https://kopia.discourse.group"
icon = "fas fa-comments"
desc = "Chat with fellow Kopia users"
[[params.links.developer]]
name = "Slack"
url = "https://slack.kopia.io"
icon = "fab fa-slack"
desc = "Chat with other project developers"
[[params.links.developer]]
name = "GitHub"
url = "https://github.com/kopia/kopia"
icon = "fab fa-github"
desc = "Development takes place here!"
desc = "Source code"
[module]
proxy = "direct"

View File

@@ -20,10 +20,6 @@ type Client struct {
ID string
}
func init() {
petname.NonDeterministicMode()
}
func newClient() *Client {
return &Client{
ID: petname.Generate(nameLen, "-") + "-" + uuid.NewString(),