Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PR dead: restic copy - add more status counters - messed up git => see new PR #5464#5319

Closed
wplapper wants to merge 43 commits into
restic:masterfrom
wplapper:cmd_copy
Closed

PR dead: restic copy - add more status counters - messed up git => see new PR #5464#5319
wplapper wants to merge 43 commits into
restic:masterfrom
wplapper:cmd_copy

Conversation

@wplapper

@wplapper wplapper commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?

This PR addresses the issue raised in #5175

code has been added to count and size the changes collected in copyBlobs. These counts are printed out via Verbosef().

Was the change previously discussed in an issue or on the forum?

#5175
closes #5175

Checklist

  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

Added struct CopyCounters which is modeled along archiver.Summary. Some of these
fields do not make sense in the context of the copy command, but they have been left,
so backup.ProgressPrinter() can be used to print the status information.

Added createSnapshotSummary() to create a restic.SnapshotSummary and save the new snapshot to the target
repository. Finally, progressReporter.Finish() will be used to create the status information either
in JSON or in text format.

cmd_copy_integration_test has be modified to accept the additional term parameter.
@wplapper

Copy link
Copy Markdown
Contributor Author

I have decided to revert this PR to closed status to ease the pressure on the
maintainers of restic. Once the number of PRs has dropped considerably, I might
moved this PR back to the queue to be reviewed. In case you consider this PR
important, please contact me via the usual channels. Thank you!

@wplapper wplapper closed this May 30, 2025
MichaelEischer and others added 26 commits August 4, 2025 12:06
…estic#5321)

* repository: expose addtional compression levels

* adding better and fastest compression levels for zstd

* repository: add changelog entry for issue-4728

* chore: fix golint issues

* chore: sort compression modes in the help text

* updating review comments
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@9780b0c...74a5d14)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* update review comments

mount: append repository ID to FS name of the FUSE mount
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.31.0 to 0.33.0.
- [Commits](golang/sys@v0.31.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.8.2 to 1.10.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/go-mgmt-sdk-release-guideline.md)
- [Commits](Azure/azure-sdk-for-go@sdk/azidentity/v1.8.2...sdk/azcore/v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-version: 1.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](Azure/azure-sdk-for-go@sdk/azcore/v1.6.0...sdk/azcore/v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
  dependency-version: 1.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
… error code (restic#5373)

* bugfix: write pprof file for `--{cpu,mem,...}-profile` even on error code

Before this, if `restic backup --cpu-profile dir/ backup-dir/` couldn't
read some of the input files (e.g. they weren't readable by the user
restic was running under), the `cpu.pprof` file it outputs would be
empty.

spf13/cobra#1893

* drop changelog as it's not relevant for end users

---------

Co-authored-by: Michael Eischer <[email protected]>
Previously, the docs were a bit mysterious about what "enables profiling
support" means or how one could take advantage of it.
This adds proper support for filenames that include directories. For
example, `/foo/bar` would result in an error when trying to open `/foo`.

The directory tree is now build upfront. This ensures let's the
directory tree construction be handled only once. All accessors then
only have to look up the constructed directory entries.
This ensures that a fixed input generates a fully deterministic output
file structure.
MichaelEischer and others added 15 commits August 4, 2025 12:06
users would find it helpful to know how to adjust the "local" backend and they might not get the idea that the local backend is just called local... which in turn leads them to think restic is slow as they can't adjust away  from 2 threads for restore and backup.
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.38.0 to 0.39.0.
- [Commits](golang/crypto@v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github.com/peterbourgon/unixtransport](https://github.com/peterbourgon/unixtransport) from 0.0.4 to 0.0.6.
- [Release notes](https://github.com/peterbourgon/unixtransport/releases)
- [Commits](peterbourgon/unixtransport@v0.0.4...v0.0.6)

---
updated-dependencies:
- dependency-name: github.com/peterbourgon/unixtransport
  dependency-version: 0.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
A tree that cannot be loaded is a fatal error when walking the tree.
Thus, return the error and exit the tree walk.
Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/go-mgmt-sdk-release-guideline.md)
- [Commits](Azure/azure-sdk-for-go@sdk/azcore/v1.10.0...sdk/azidentity/v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.11.0 to 0.12.0.
- [Commits](golang/time@v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-version: 0.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
reworked cmd/restic/cmd_copy.go by just counting out the changes in
'copyBlobs' and printing then out via Verbosef()
@wplapper wplapper reopened this Aug 4, 2025
@wplapper

wplapper commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author

Sorry about all these extra COMMITs. I still don't always know how to manage git :( .

@wplapper

wplapper commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author

Sorry for the git mess. Will create a new PR.

@wplapper wplapper closed this Aug 4, 2025
@wplapper wplapper deleted the cmd_copy branch August 4, 2025 11:44
@wplapper wplapper changed the title restic copy - add more status counters restic copy - add more status counters - messed up git => see new PR #5464 Aug 4, 2025
@wplapper wplapper changed the title restic copy - add more status counters - messed up git => see new PR #5464 PR dead: restic copy - add more status counters - messed up git => see new PR #5464 Aug 4, 2025
blake-hamm added a commit to blake-hamm/bhamm-lab that referenced this pull request Jul 6, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [restic/restic](https://restic.net) ([source](https://github.com/restic/restic)) | minor | `0.18.1` → `0.19.1` |

---

### Release Notes

<details>
<summary>restic/restic (restic/restic)</summary>

### [`v0.19.1`](https://github.com/restic/restic/blob/HEAD/CHANGELOG.md#Changelog-for-restic-0191-2026-07-05)

[Compare Source](restic/restic@v0.19.0...v0.19.1)

The following sections list the changes in restic 0.19.1 relevant to
restic users. The changes are ordered by importance.

#### Summary

- Fix [#&#8203;5234](restic/restic#5234): Prevent mounting over the repository directory
- Fix [#&#8203;5667](restic/restic#5667): Skip inaccessible `backup` source paths
- Fix [#&#8203;5722](restic/restic#5722): Update `mount` latest symlink after snapshot reload
- Fix [#&#8203;21866](restic/restic#21866): Hide `stats` progress bar in JSON mode
- Fix [#&#8203;21869](restic/restic#21869): Restore old behavior of `snapshots --latest <n>` without `--group-by`
- Fix [#&#8203;21876](restic/restic#21876): Show timezone location in `snapshots` output
- Fix [#&#8203;21879](restic/restic#21879): Prevent crash in mountpoint validation if mountpoint is inaccessible
- Fix [#&#8203;21895](restic/restic#21895): Remove read-only files via the SFTP backend on Windows servers
- Fix [#&#8203;21899](restic/restic#21899): Make `backup` respect excludes for duplicate directory entries

#### Details

- Bugfix [#&#8203;5234](restic/restic#5234): Prevent mounting over the repository directory

  Using a local repository directory as the `mount` target — or a path that
  contains it, or that it contains — caused the FUSE server to read its own
  backend files through the new mount, deadlocking the kernel and requiring a long
  reboot to recover.

  Restic now resolves both paths and refuses any such overlap with a clear error
  before mounting.

  [#&#8203;5234](restic/restic#5234)
  [#&#8203;5348](restic/restic#5348)

- Bugfix [#&#8203;5667](restic/restic#5667): Skip inaccessible `backup` source paths

  The `backup` command only skipped source paths that did not exist. A path that
  could not be accessed for another reason, such as a malformed path on Windows,
  was kept and produced an empty snapshot. Restic now skips any such path and
  aborts if none remain.

  [#&#8203;5667](restic/restic#5667)
  [#&#8203;21852](restic/restic#21852)

- Bugfix [#&#8203;5722](restic/restic#5722): Update `mount` latest symlink after snapshot reload

  When `restic mount` was kept running while new snapshots were created, the new
  snapshots appeared in the mountpoint, but the `latest` symlink could still point
  to the previously latest snapshot. Restic now invalidates the cached snapshot
  directory entries after a snapshot reload so that `latest` points to the newest
  snapshot.

  [#&#8203;5722](restic/restic#5722)
  [#&#8203;21873](restic/restic#21873)

- Bugfix [#&#8203;21866](restic/restic#21866): Hide `stats` progress bar in JSON mode

  Since restic 0.19.0, the `stats` command shows a progress bar. This progress bar
  was unintentionally displayed also when using the `--json` option, mixing
  regular text output with JSON. This is now fixed.

  [#&#8203;21866](restic/restic#21866)
  [#&#8203;21871](restic/restic#21871)

- Bugfix [#&#8203;21869](restic/restic#21869): Restore old behavior of `snapshots --latest <n>` without `--group-by`

  Restic 0.19.0 accidentally changed the behavior of `snapshots --latest <n>` to
  no longer group snapshots by host and paths by default.

  The `snapshots --latest <n>` command now again uses the old behavior of grouping
  by host and paths when `--group-by` is not specified. However, when specifying
  `--group-by` the output is still grouped as requested, as in restic 0.19.0.

  [#&#8203;21869](restic/restic#21869)
  [#&#8203;21875](restic/restic#21875)

- Bugfix [#&#8203;21876](restic/restic#21876): Show timezone location in `snapshots` output

  With restic 0.19.0, the `snapshots` command printed the current timezone when
  listing snapshots. However, that timezone label might change during the year,
  for example with daylight saving time. Restic now prints a more consistent and
  shorter version of the text.

  [#&#8203;21876](restic/restic#21876)
  <https://forum.restic.net/t/possible-bug-in-timezone-naming/10867>

- Bugfix [#&#8203;21879](restic/restic#21879): Prevent crash in mountpoint validation if mountpoint is inaccessible

  Since restic 0.19.0, the `mount` command validates a mountpoint before loading
  the repository. If restic was unable to stat the mountpoint, this would result
  in a crash. This has now been fixed to correctly return an error instead.

  [#&#8203;21879](restic/restic#21879)

- Bugfix [#&#8203;21895](restic/restic#21895): Remove read-only files via the SFTP backend on Windows servers

  Since restic 0.19.0, repository files on the SFTP backend are marked read-only
  after save. On Windows SFTP servers, removing them failed with a permission
  error. The SFTP backend now clears the read-only flag before removing the file.

  [#&#8203;21895](restic/restic#21895)
  [#&#8203;21897](restic/restic#21897)

- Bugfix [#&#8203;21899](restic/restic#21899): Make `backup` respect excludes for duplicate directory entries

  Since restic 0.19.0, backing up a directory with duplicate directory entries
  always produced "Warning: at least one source file could not be read", even when
  those files were excluded. This has now been fixed.

  [#&#8203;21899](restic/restic#21899)
  [#&#8203;21900](restic/restic#21900)

### [`v0.19.0`](https://github.com/restic/restic/blob/HEAD/CHANGELOG.md#Changelog-for-restic-0190-2026-06-09)

[Compare Source](restic/restic@v0.18.1...v0.19.0)

The following sections list the changes in restic 0.19.0 relevant to
restic users. The changes are ordered by importance.

#### Summary

- Fix [#&#8203;2034](restic/restic#2034): Support serving a `restic mount` of a Windows system via Samba
- Fix [#&#8203;4447](restic/restic#4447): Use mode 0700 for repository directories created over SFTP
- Fix [#&#8203;4467](restic/restic#4467): Exit with code 3 when some `backup` source paths do not exist
- Fix [#&#8203;4759](restic/restic#4759): Error out when environment variables hold invalid values
- Fix [#&#8203;5233](restic/restic#5233): Return exit code 3 when failing to remove snapshots
- Fix [#&#8203;5258](restic/restic#5258): Exit with code 130 on SIGINT
- Fix [#&#8203;5280](restic/restic#5280): Reject impossible `find` time bounds immediately
- Fix [#&#8203;5280](restic/restic#5280): Make `find --pack` list blobs for tree packs
- Fix [#&#8203;5354](restic/restic#5354): Allow `rclone` and `sftp` backends when running in background
- Fix [#&#8203;5427](restic/restic#5427): Correctly restore ACL inheritance state on Windows
- Fix [#&#8203;5477](restic/restic#5477): Password prompt was sometimes not shown for `backup -v`
- Fix [#&#8203;5487](restic/restic#5487): Mark repository files read-only when using the SFTP backend
- Fix [#&#8203;5586](restic/restic#5586): Correctly handle `snapshots --group-by` with `--latest`
- Fix [#&#8203;5595](restic/restic#5595): Avoid spurious `chmod` errors on certain file backends
- Fix [#&#8203;5683](restic/restic#5683): Prevent `backup --stdin-from-command` from hanging
- Fix [#&#8203;5757](restic/restic#5757): Respect `--user` and `--host` in `key passwd`
- Fix [#&#8203;21820](restic/restic#21820): Correct handling of duplicate index entries
- Fix [#&#8203;21820](restic/restic#21820): Correctly handle pack files missing from the index
- Chg [#&#8203;5293](restic/restic#5293): Prune small packfiles more aggressively
- Chg [#&#8203;5767](restic/restic#5767): Prevent excluding paths explicitly passed to `backup`
- Chg [#&#8203;21791](restic/restic#21791): Update dependencies and require Go 1.25 or newer
- Enh [#&#8203;3326](restic/restic#3326): Limit `check` to snapshots selected by filters
- Enh [#&#8203;3572](restic/restic#3572): Support restoring ownership by name on UNIX systems
- Enh [#&#8203;3738](restic/restic#3738): Optional GitHub token for `self-update` API requests
- Enh [#&#8203;4278](restic/restic#4278): Support include filters in the `rewrite` command
- Enh [#&#8203;4728](restic/restic#4728): Support zstd compression levels `fastest` and `better`
- Enh [#&#8203;4868](restic/restic#4868): Include repository ID in the filesystem name used by `mount`
- Enh [#&#8203;5175](restic/restic#5175): Add status counters to `copy` in verbose text output
- Enh [#&#8203;5352](restic/restic#5352): Support excluding cloud-backed files on macOS
- Enh [#&#8203;5383](restic/restic#5383): Reduce progress bar refresh rates to decrease energy usage
- Enh [#&#8203;5424](restic/restic#5424): Enable Windows filesystem privileges before file access
- Enh [#&#8203;5440](restic/restic#5440): Make `--host` override environment variable `RESTIC_HOST`
- Enh [#&#8203;5448](restic/restic#5448): Support configuring `nice` and `ionice` in the Docker image
- Enh [#&#8203;5453](restic/restic#5453): Copy multiple snapshots in batches
- Enh [#&#8203;5523](restic/restic#5523): Add Open Container Initiative labels to release Docker image
- Enh [#&#8203;5531](restic/restic#5531): Reduce Azure storage costs by optimizing uploads
- Enh [#&#8203;5562](restic/restic#5562): Rewrite only changed status lines each frame
- Enh [#&#8203;5588](restic/restic#5588): Show timezone context in `snapshots` output
- Enh [#&#8203;5610](restic/restic#5610): Reduce `check`, `copy`, `diff` and `stats` memory usage
- Enh [#&#8203;5689](restic/restic#5689): Show more detailed progress for `stats`
- Enh [#&#8203;5713](restic/restic#5713): Significantly speed up index loading
- Enh [#&#8203;5718](restic/restic#5718): Stricter and earlier validation of the `mount` point

#### Details

- Bugfix [#&#8203;2034](restic/restic#2034): Support serving a `restic mount` of a Windows system via Samba

  A repository mounted using `restic mount` on a POSIX system could not use Samba
  to serve files from backups of Windows systems, while backups of non-Windows
  systems could be served successfully. This has now been fixed.

  [#&#8203;2034](restic/restic#2034)
  [#&#8203;4382](restic/restic#4382)
  [#&#8203;21784](restic/restic#21784)

- Bugfix [#&#8203;4447](restic/restic#4447): Use mode 0700 for repository directories created over SFTP

  When creating a repository over SFTP, restic created the repository directories
  with the SFTP server's default permissions, often 0755, rather than the 0700
  permissions it uses for local repositories.

  Restic now creates these directories with 0700 permissions.

  [#&#8203;4447](restic/restic#4447)
  [#&#8203;21817](restic/restic#21817)

- Bugfix [#&#8203;4467](restic/restic#4467): Exit with code 3 when some `backup` source paths do not exist

  Restic used to exit with code 0 when a top-level backup source path was missing,
  and exited with code 3 only when a child path under an existing source did not
  exist. Scripts that relied on the exit code could therefore treat an incomplete
  backup as success.

  Restic now exits with code 3 when any backup source path does not exist.

  [#&#8203;4467](restic/restic#4467)
  [#&#8203;5347](restic/restic#5347)

- Bugfix [#&#8203;4759](restic/restic#4759): Error out when environment variables hold invalid values

  If the environment variables `RESTIC_COMPRESSION`, `RESTIC_PACK_SIZE`, or
  `RESTIC_READ_CONCURRENCY` could not be parsed, restic used to ignore them.
  Restic now fails with an error unless the same setting is overridden on the
  command line.

  [#&#8203;4759](restic/restic#4759)
  [#&#8203;5592](restic/restic#5592)
  [#&#8203;5700](restic/restic#5700)

- Bugfix [#&#8203;5233](restic/restic#5233): Return exit code 3 when failing to remove snapshots

  Previously, the `forget` command returned exit code 0 when it failed to remove
  one or more snapshots. This was misleading to scripts.

  The `forget` command now instead returns exit code 3 when failing to remove one
  or more snapshots.

  [#&#8203;5233](restic/restic#5233)
  [#&#8203;5322](restic/restic#5322)

- Bugfix [#&#8203;5258](restic/restic#5258): Exit with code 130 on SIGINT

  Restic used to return exit code 1 on SIGINT. It now returns 130, the usual
  convention for a process stopped by Ctrl-C.

  [#&#8203;5258](restic/restic#5258)
  [#&#8203;5363](restic/restic#5363)

- Bugfix [#&#8203;5280](restic/restic#5280): Reject impossible `find` time bounds immediately

  The `find` command now fails with an error when both `--oldest` and `--newest`
  are set and `--oldest` is later than `--newest`.

  [#&#8203;5280](restic/restic#5280)
  [#&#8203;5310](restic/restic#5310)

- Bugfix [#&#8203;5280](restic/restic#5280): Make `find --pack` list blobs for tree packs

  The `find --pack <tree-pack>` command now also reports blobs for packs that only
  contain tree blobs.

  [#&#8203;5280](restic/restic#5280)
  [#&#8203;5664](restic/restic#5664)

- Bugfix [#&#8203;5354](restic/restic#5354): Allow `rclone` and `sftp` backends when running in background

  Previously, starting restic in the background could result in unexpected
  behavior when using the `rclone` or `sftp` backends. For example, `restic -r
  rclone:./example --insecure-no-password init &` could cause the calling `bash`
  shell to exit unexpectedly.

  This has now been fixed.

  [#&#8203;5354](restic/restic#5354)
  [#&#8203;5358](restic/restic#5358)
  [#&#8203;5493](restic/restic#5493)
  [#&#8203;5494](restic/restic#5494)

- Bugfix [#&#8203;5427](restic/restic#5427): Correctly restore ACL inheritance state on Windows

  Since security descriptor backups were added in restic 0.17.0, Access Control
  Entry inheritance was not restored correctly on Windows; restored permissions
  were always marked as explicit (not inherited) even when they were inherited
  from a parent folder.

  The inheritance flags are now correctly applied when restoring the security
  descriptor, preserving the original permission structure.

  [#&#8203;5427](restic/restic#5427)
  [#&#8203;5465](restic/restic#5465)

- Bugfix [#&#8203;5477](restic/restic#5477): Password prompt was sometimes not shown for `backup -v`

  The repository password prompt could be hidden when running the `backup -v`
  command. This has now been fixed.

  [#&#8203;5477](restic/restic#5477)
  [#&#8203;5554](restic/restic#5554)

- Bugfix [#&#8203;5487](restic/restic#5487): Mark repository files read-only when using the SFTP backend

  Files created through the SFTP backend previously stayed writable. New files now
  get read-only permissions where the server supports `chmod`.

  [#&#8203;5487](restic/restic#5487)
  [#&#8203;5497](restic/restic#5497)

- Bugfix [#&#8203;5586](restic/restic#5586): Correctly handle `snapshots --group-by` with `--latest`

  For the `snapshots` command, `--latest` did not interact correctly with a
  non-default `--group-by` value. This combination now behaves as intended.

  [#&#8203;5586](restic/restic#5586)
  [#&#8203;5601](restic/restic#5601)

- Bugfix [#&#8203;5595](restic/restic#5595): Avoid spurious `chmod` errors on certain file backends

  On filesystems that do not support `chmod` (for example CIFS or FUSE-mounted
  WebDAV), restic since version 0.18.0 failed to remove stale locks, throwing the
  error `chmod ...: operation not supported`. This has now been fixed.

  [#&#8203;5595](restic/restic#5595)
  [#&#8203;5596](restic/restic#5596)

- Bugfix [#&#8203;5683](restic/restic#5683): Prevent `backup --stdin-from-command` from hanging

  When using `--stdin-from-command`, the `backup` command could hang until
  manually cancelled if the backup stopped before all subprocess output was
  consumed, for example after a failed upload to the repository. This has now been
  fixed.

  [#&#8203;5683](restic/restic#5683)
  [#&#8203;21829](restic/restic#21829)

- Bugfix [#&#8203;5757](restic/restic#5757): Respect `--user` and `--host` in `key passwd`

  The `key passwd` command previously ignored the `--user` and `--host` options
  and always stored the new key with the current user and host name. These options
  are now honored.

  [#&#8203;5757](restic/restic#5757)
  [#&#8203;21781](restic/restic#21781)

- Bugfix [#&#8203;21820](restic/restic#21820): Correct handling of duplicate index entries

  Before restic 0.10.0, a bug could, in very rare cases, split information about a
  pack file across multiple index files.

  Since restic 0.17.0, any operation that rewrites the index (like `prune` or
  `repair packs`) could lose part of that information, resulting in errors in
  later `check` or `prune` runs. This can be fixed by running `repair packs`, and
  only repositories using repository format version 1 might be affected.

  Split pack index entries are no longer lost during index rewrites. The `check`
  command now reports these cases as errors that can be fixed using the `repair
  packs` command. On older restic versions, running `repair index` twice also
  fixes the problem.

  [#&#8203;21820](restic/restic#21820)
  [#&#8203;21828](restic/restic#21828)

- Bugfix [#&#8203;21820](restic/restic#21820): Correctly handle pack files missing from the index

  The `repair packs` command was unable to salvage blobs from a pack file if the
  pack file was not contained in the index or the index entry was incomplete.

  The command now uses information from both the index and the pack file header.

  [#&#8203;21820](restic/restic#21820)
  [#&#8203;21827](restic/restic#21827)

- Change [#&#8203;5293](restic/restic#5293): Prune small packfiles more aggressively

  The `prune` command now repacks more small packfiles by default. The option
  `--repack-small` is no longer needed and has been marked as deprecated. The
  `--repack-smaller-than` option can still be used to further control repacking of
  small pack files.

  [#&#8203;5293](restic/restic#5293)
  [#&#8203;21803](restic/restic#21803)

- Change [#&#8203;5767](restic/restic#5767): Prevent excluding paths explicitly passed to `backup`

  When e.g. `restic backup --exclude-if-present .git /home/user/data` was run and
  `/home/user/.git` existed, restic excluded the `data` directory from the
  snapshot. The same applied to `--exclude-caches` or `--one-file-system`.

  Similarly, `restic backup --exclude-larger-than 1M large-file.bin` produced an
  empty snapshot when the file was larger than one megabyte.

  The `backup` command now tracks which files and directories were specified on
  the command line and does not apply excludes to those paths. Content inside a
  backed-up directory is still filtered by excludes as before.

  [#&#8203;5767](restic/restic#5767)
  [#&#8203;21797](restic/restic#21797)

- Change [#&#8203;21791](restic/restic#21791): Update dependencies and require Go 1.25 or newer

  Dependencies have been updated. Building restic now requires Go 1.25 or newer.
  The Windows build with Go 1.26 was also fixed.

  [#&#8203;21791](restic/restic#21791)
  [#&#8203;5619](restic/restic#5619)
  [#&#8203;21796](restic/restic#21796)

- Enhancement [#&#8203;3326](restic/restic#3326): Limit `check` to snapshots selected by filters

  The `check` command can now restrict pack verification to snapshots chosen with
  the usual snapshot filters (`--tag`, `--host`, `--path`, or explicit snapshot
  IDs on the command line).

  [#&#8203;3326](restic/restic#3326)
  [#&#8203;5469](restic/restic#5469)
  [#&#8203;5644](restic/restic#5644)

- Enhancement [#&#8203;3572](restic/restic#3572): Support restoring ownership by name on UNIX systems

  The `restore` command used to restore file ownership on UNIX systems by UID and
  GID. It now supports restoring ownership by user and group name with
  `--ownership-by-name`, so that snapshots can be restored on systems where
  numeric IDs do not match those on the backup host.

  Note: POSIX ACLs are still restored by numeric value; this change does not add
  ACL-by-name support.

  [#&#8203;3572](restic/restic#3572)
  [#&#8203;5449](restic/restic#5449)

- Enhancement [#&#8203;3738](restic/restic#3738): Optional GitHub token for `self-update` API requests

  The `self-update` command used only unauthenticated GitHub API requests when
  checking for releases. Shared IP addresses could hit the GitHub rate limit,
  resulting in a 403 Forbidden error and preventing updates.

  Unauthenticated requests remain the default, but authenticated requests are now
  possible. Set the environment variable `GITHUB_ACCESS_TOKEN` to a GitHub
  [personal access token](https://github.com/settings/tokens) to avoid rate-limit
  failures.

  [#&#8203;3738](restic/restic#3738)
  [#&#8203;5568](restic/restic#5568)

- Enhancement [#&#8203;4278](restic/restic#4278): Support include filters in the `rewrite` command

  The `rewrite` command now accepts the same include filter options as the
  `restore` command (`--include`, `--include-file`, `--iinclude`,
  `--iinclude-file`, and short `-i`). Include and exclude filter options are
  mutually exclusive.

  [#&#8203;4278](restic/restic#4278)
  [#&#8203;5191](restic/restic#5191)

- Enhancement [#&#8203;4728](restic/restic#4728): Support zstd compression levels `fastest` and `better`

  Restic now supports the zstd compression modes `fastest` and `better`. Set the
  environment variable `RESTIC_COMPRESSION` to `fastest` or `better`, or pass the
  same values with the `--compression` option.

  [#&#8203;4728](restic/restic#4728)
  [#&#8203;5321](restic/restic#5321)

- Enhancement [#&#8203;4868](restic/restic#4868): Include repository ID in the filesystem name used by `mount`

  The filesystem exposed by the `mount` command now includes the repository ID in
  its name. The ID is printed when opening a repository or can be read with
  `restic cat config`.

  ```
  $ df ./test-mount/
  Filesystem        1K-blocks  Used Available Use% Mounted on
  restic:d3b07384d1         0     0         0    - /mnt/my-restic-repo
  ```

  [#&#8203;4868](restic/restic#4868)
  [#&#8203;5243](restic/restic#5243)

- Enhancement [#&#8203;5175](restic/restic#5175): Add status counters to `copy` in verbose text output

  The `copy` command now prints additional counters in text mode when `--verbose`
  is set: blobs to copy, their on-disk size, and the number of pack files read
  from the source repository.

  [#&#8203;5175](restic/restic#5175)
  [#&#8203;5319](restic/restic#5319)

- Enhancement [#&#8203;5352](restic/restic#5352): Support excluding cloud-backed files on macOS

  Previously, restic treated cloud-backed files (such as files stored on iCloud)
  like normal local files, forcing a full download of placeholders and other
  "meant to be cloud only" content during backups.

  The `backup` command now supports `--exclude-cloud-files` (previously only
  available on Windows) to skip those files on supported macOS versions. From
  Sonoma (macOS 14.0) onward the option can prevent unwanted downloads. Older
  macOS versions will still download the files during a backup run.

  [#&#8203;5352](restic/restic#5352)
  [#&#8203;5370](restic/restic#5370)

- Enhancement [#&#8203;5383](restic/restic#5383): Reduce progress bar refresh rates to decrease energy usage

  Progress bars were previously updated at 60 frames per second, which could cause
  high CPU or GPU usage in some terminal emulators.

  The refresh rate is now 10 FPS to conserve energy. For some terminal emulators,
  the lower rate is also necessary to allow selecting text in the terminal.

  [#&#8203;5383](restic/restic#5383)
  [#&#8203;5551](restic/restic#5551)
  [#&#8203;5626](restic/restic#5626)

- Enhancement [#&#8203;5424](restic/restic#5424): Enable Windows filesystem privileges before file access

  Restic used to enable some Windows filesystem privileges only while reading or
  writing security descriptors. Extended attributes could therefore be read before
  enabling the backup privilege, possibly resulting in missed data or errors.

  Restic now enables the relevant filesystem privileges before any file access.

  [#&#8203;5424](restic/restic#5424)

- Enhancement [#&#8203;5440](restic/restic#5440): Make `--host` override environment variable `RESTIC_HOST`

  Previously, when the environment variable `RESTIC_HOST` was set, snapshot
  listings and other operations were always filtered to that host.

  Passing `--host` as an empty string (`--host=""` or `--host=`) now overrides
  `RESTIC_HOST` and shows snapshots from all hosts.

  The same override applies to other commands that support snapshot filters,
  including `snapshots`, `forget`, `find`, `stats`, `copy`, `tag`, `repair
  snapshots`, `rewrite`, `mount`, `restore`, `dump`, and `ls`.

  [#&#8203;5440](restic/restic#5440)
  [#&#8203;5541](restic/restic#5541)

- Enhancement [#&#8203;5448](restic/restic#5448): Support configuring `nice` and `ionice` in the Docker image

  The container entrypoint now reads optional scheduling hints from the
  environment:

  - The environment variable `NICE` sets the process nice value (see `man nice`).

  - The environment variable `IONICE_CLASS` selects the I/O scheduling class (see
    `man ionice`). Real-time classes need the `SYS_NICE` capability added to the
    container.

  - The environment variable `IONICE_PRIORITY` sets the priority within
    `IONICE_CLASS` and has no effect unless `IONICE_CLASS` is set; it defaults to
    `4` (neutral priority).

  For further details, please see:
  <https://restic.readthedocs.io/en/stable/020_installation.html#docker-container>

  [#&#8203;5448](restic/restic#5448)

- Enhancement [#&#8203;5453](restic/restic#5453): Copy multiple snapshots in batches

  The `copy` command used to copy snapshots one at a time, even when doing so
  produced pack files smaller than the target pack size. This led to many small
  files when copying small incremental snapshots.

  The `copy` command now copies multiple snapshots together so that small pack
  files are avoided where possible.

  [#&#8203;5453](restic/restic#5453)
  [#&#8203;5472](restic/restic#5472)

- Enhancement [#&#8203;5523](restic/restic#5523): Add Open Container Initiative labels to release Docker image

  The release Docker image now includes OCI-style image annotation labels, which
  helps external tooling identify the image.

  [#&#8203;5523](restic/restic#5523)

- Enhancement [#&#8203;5531](restic/restic#5531): Reduce Azure storage costs by optimizing uploads

  Restic previously used Azure PutBlock and PutBlockList for every upload, which
  cost two storage transactions per file and roughly doubled transaction charges
  for repositories with many pack files.

  Files up to 256 MiB now use PutBlob, requiring only a single transaction per
  file and cutting typical transaction costs by about half. Larger blobs still use
  block uploads as required by Azure.

  [#&#8203;5531](restic/restic#5531)
  [#&#8203;5544](restic/restic#5544)

- Enhancement [#&#8203;5562](restic/restic#5562): Rewrite only changed status lines each frame

  The status bar rewrote every line on each frame whenever any content changed,
  which made selecting text impossible in some terminal emulators even when most
  lines were unchanged.

  Now only lines that actually change are rewritten on each update.

  [#&#8203;5562](restic/restic#5562)
  [#&#8203;5648](restic/restic#5648)

- Enhancement [#&#8203;5588](restic/restic#5588): Show timezone context in `snapshots` output

  The `snapshots` command now prints which timezone is used for displayed
  timestamps. Snapshots may have been created in different timezones but are shown
  in the local timezone, so a footer line (for example, timestamps shown in CET)
  clarifies the display context when comparing snapshots from several sources.

  [#&#8203;5588](restic/restic#5588)

- Enhancement [#&#8203;5610](restic/restic#5610): Reduce `check`, `copy`, `diff` and `stats` memory usage

  The `check`, `copy`, `diff` and `stats` commands now use less memory when
  handling large snapshots.

  [#&#8203;5610](restic/restic#5610)

- Enhancement [#&#8203;5689](restic/restic#5689): Show more detailed progress for `stats`

  The `stats` command used to show progress only while loading the index. During
  the scan it printed only `scanning...` with no further updates. It now reports
  how many snapshots, files, and blobs have been processed so far.

  [#&#8203;5689](restic/restic#5689)
  [#&#8203;5705](restic/restic#5705)

- Enhancement [#&#8203;5713](restic/restic#5713): Significantly speed up index loading

  Loading the index for a large repository is now significantly faster. Also, the
  `mount` command now loads the index once at startup and then only loads new
  index files as they appear. It also loads snapshots before printing that the
  repository is being served.

  [#&#8203;5713](restic/restic#5713)
  [#&#8203;5720](restic/restic#5720)

- Enhancement [#&#8203;5718](restic/restic#5718): Stricter and earlier validation of the `mount` point

  The `mount` command previously accepted invalid mount points, resulting in an
  error after loading the repository. The specified mount point must now refer to
  a directory that the current user can access and write to, and this check is
  performed before opening the repository.

  [#&#8203;5718](restic/restic#5718)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDkuNSIsInVwZGF0ZWRJblZlciI6IjQzLjI0OS41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: Renovate Bot <[email protected]>
Reviewed-on: https://codeberg.org/blake-hamm/bhamm-lab/pulls/271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restic copy - give more information in summary, like backup