restic 0.17.2 → 0.20.0
6 releases · 4 breaking changes · 7 security fixes · 0 advisories fixed
7security4breaking2deprecated44feature95fix
Breaking changes
- breaking Bugfix #21977: Don't crash on truncated key or config file Restic previously crashed with a slice bounds panic when the repository contained a key or config file that was shorter than the encryption overhead, for example after an upload was interrupted. Since every command has to read a key file,… in 0.20.0
- breaking Bugfix #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… in 0.19.1
- breaking Bugfix #5421: Fix rare crash if directory is removed during backup In restic 0.18.0, the backup command could crash if a directory was removed between reading its metadata and listing its directory content. This has now been fixed. in 0.18.1
- breaking Bugfix #2165: Ignore disappeared backup source files The backup command now quietly skips files that are removed between directory listing and backup, instead of printing errors like: error: lstat /some/file/name: no such file or directory in 0.18.0
Security changes
- security Security #22178: Fix ownership when restore --ownership-by-name cannot resolve names When restoring with --ownership-by-name, user or group names that could not be resolved on the restore host (or were not recorded in the snapshot) caused restic to change the owner of the restored file to UID/GID… in 0.20.0
- security Security #22180: Reject duplicate or out-of-order node names during restore A tree containing a symlink and a directory with the same name could let restore write through the symlink to files outside the restore target. Restic now rejects trees whose node names are not strictly increasing during… in 0.20.0
- security Bugfix #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… in 0.19.0
- security Enhancement #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… in 0.19.0
- security Security #5291: Mitigate attack on content-defined chunking algorithm Restic uses Rabin Fingerprints for its content-defined chunker. The algorithm relies on a secret polynomial to split files into chunks. As shown in the paper "Chunking Attacks on File Backup Services using Content-Defined… in 0.18.0
- security Bugfix #5169: Prevent Windows VSS event log 8194 warnings for backup with fs snapshot When running backup with the --use-fs-snapshot option in Windows with admin rights, event logs like Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr =… in 0.18.0
- security Bugfix #5003: Fix metadata errors during backup of removable disks on Windows Since restic 0.17.0, backing up removable disks on Windows could report errors with retrieving metadata like shown below. error: incomplete metadata for d:\filename: get named security info failed with: Access is denied.… in 0.17.3
Deprecations
- deprecated Change #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. in 0.19.0
- deprecated Change #5162: Promote feature flags The deprecate-legacy-index, deprecate-s3-legacy-layout, explicit-s3-anonymous-auth and safe-forget-keep-tags features are now stable and can no longer be disabled. The corresponding feature flags will be removed in restic 0.19.0. in 0.18.0
Every release in between
fixSec: Fix ownership when restore --ownership-by-name cannot resolve names
otherSec: Reject duplicate or out-of-order node names during restore
fixFix: Don't crash on truncated key or config file
fixFix: Redact swift backend password in debug log output
fixFix: Reject empty repository location files
fixFix: Restore partially matching hard-linked files correctly
fixFix: Handle empty directories from older repaired snapshots
fixFix: Don't reset stats progress bar counters for every snapshot
fixFix: Improve error message when prune fails to list pack files
fixFix: Improve resilience of repository v2 upgrade rollback
fixFix: Error on too large numbers in --keep-within* durations
fixFix: Do not delete files in directories whose tree cannot be loaded
otherChg: Require Go 1.26.10 or newer
featureEnh: Add JSON support to prune command
featureEnh: Add option to disable AWS S3 dual-stack endpoints
featureEnh: Add warmup support for check on the S3 backend
otherEnh: Support specifying snapshot ID in list packs command
otherEnh: Support Multi-Bucket Application Keys in the b2 backend
otherEnh: Handle missing pack files in repair packs
otherEnh: Show excluded items during backup in verbose mode
otherEnh: Handle corrupted pack files in find --pack
otherEnh: Make repair snapshots --forget remove broken snapshots
otherEnh: Reduce memory usage of the in-memory index
securitySecurity #22178: Fix ownership when restore --ownership-by-name cannot resolve names When restoring with --ownership-by-name, user or group names that could not be resolved on the restore host (or were not recorded in the snapshot) caused restic to change the owner of the restored file to UID/GID…
securitySecurity #22180: Reject duplicate or out-of-order node names during restore A tree containing a symlink and a directory with the same name could let restore write through the symlink to files outside the restore target. Restic now rejects trees whose node names are not strictly increasing during…
breakingBugfix #21977: Don't crash on truncated key or config file Restic previously crashed with a slice bounds panic when the repository contained a key or config file that was shorter than the encryption overhead, for example after an upload was interrupted. Since every command has to read a key file,…
fixBugfix #22007: Redact swift backend password in debug log output Restic could previously write the OpenStack Swift backend password in clear text to the debug log when debug logging was enabled. The password came from the environment variables OS_PASSWORD and ST_KEY. It is now redacted.
fixBugfix #22051: Reject empty repository location files Previously, if the --repository-file option or RESTIC_REPOSITORY_FILE environment variable referred to a file that was either empty or contained only whitespace, restic used the current directory for the repository. This has now been fixed, and…
fixBugfix #22085: Restore partially matching hard-linked files correctly When restoring over an existing file which had hard links and was partially different from the file in the snapshot, restic used to replace the file with an empty one but only restored the changed parts. The restored file then…
fixBugfix #22092: Handle empty directories from older repaired snapshots Since restic 0.19.0, snapshots containing empty directories written by older versions of repair snapshots could fail with error decoding tree: expected [, got . This has now been fixed, allowing prune, check and restore to…
fixBugfix #22112: Don't reset stats progress bar counters for every snapshot The progress bar of the stats command previously reset its file, blob and size counters at the start of each snapshot, so the final progress line only showed the numbers for the last processed snapshot. These numbers varied…
fixBugfix #22120: Improve error message when prune fails to list pack files When listing the pack files of a repository failed during prune, for example due to a request timeout, restic printed the error together with a stack trace. Restic now instead reports a short error message stating that…
fixBugfix #22136: Improve resilience of repository v2 upgrade rollback When an upgrade from repository version 1 to version 2 failed, restic deleted the configuration file before writing the previous version of it back. If writing the old configuration file back also failed, the repository no longer…
fixBugfix #22163: Error on too large numbers in --keep-within* durations Restic used to crash with a stack trace when a number in a duration such as the one passed to forget --keep-within did not fit into an integer. It now reports an invalid argument instead.
fixBugfix #22181: Do not delete files in directories whose tree cannot be loaded When restore --delete failed to load or read the tree of a directory, for example because a pack file was missing, restic reported an error but then deleted all existing content of that directory in the target. Restic…
otherChange #22104: Require Go 1.26.10 or newer Restic now requires Go 1.26.10 or newer to build, as the library used to access the B2 backend requires it.
featureEnhancement #3129: Add JSON support to prune command The prune command now supports the --json option for JSON output.
featureEnhancement #5189: Add option to disable AWS S3 dual-stack endpoints Restic used dual-stack endpoints for AWS regions that have them, with no way to opt out. VPC interface and gateway endpoints do not support dual-stack, so a repository reachable over a VPC endpoint could not be used. Passing -o…
featureEnhancement #5248: Add warmup support for check on the S3 backend The check command can now warm up pack files from cold storage on S3 and S3-compatible providers before reading them. Like the other cold storage features, this remains experimental and is gated behind the s3-restore feature flag.
fixEnhancement #21845: Handle missing pack files in repair packs Missing and damaged pack files previously required separate approaches to fix a repository. Both cases can now be handled by the repair packs command, which removes missing pack files from the repository index.
+6 more items in the release notesfixFix: Prevent mounting over the repository directory
fixFix: Skip inaccessible backup source paths
fixFix: Update mount latest symlink after snapshot reload
fixFix: Hide stats progress bar in JSON mode
fixFix: Restore old behavior of snapshots --latest without --group-by
fixFix: Show timezone location in snapshots output
fixFix: Prevent crash in mountpoint validation if mountpoint is inaccessible
fixFix: Remove read-only files via the SFTP backend on Windows servers
fixFix: Make backup respect excludes for duplicate directory entries
fixBugfix #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…
fixBugfix #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…
fixBugfix #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…
fixBugfix #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.
fixBugfix #21869: Restore old behavior of snapshots --latest without --group-by Restic 0.19.0 accidentally changed the behavior of snapshots --latest to no longer group snapshots by host and paths by default. The snapshots --latest command now again uses the old behavior of grouping by host and paths…
fixBugfix #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…
fixBugfix #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…
breakingBugfix #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…
fixBugfix #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.
fixFix: Support serving a restic mount of a Windows system via Samba
fixFix: Use mode 0700 for repository directories created over SFTP
fixFix: Exit with code 3 when some backup source paths do not exist
fixFix: Error out when environment variables hold invalid values
fixFix: Return exit code 3 when failing to remove snapshots
fixFix: Exit with code 130 on SIGINT
fixFix: Reject impossible find time bounds immediately
fixFix: Make find --pack list blobs for tree packs
fixFix: Allow rclone and sftp backends when running in background
fixFix: Correctly restore ACL inheritance state on Windows
fixFix: Password prompt was sometimes not shown for backup -v
fixFix: Mark repository files read-only when using the SFTP backend
fixFix: Correctly handle snapshots --group-by with --latest
fixFix: Avoid spurious chmod errors on certain file backends
fixFix: Prevent backup --stdin-from-command from hanging
fixFix: Respect --user and --host in key passwd
fixFix: Correct handling of duplicate index entries
fixFix: Correctly handle pack files missing from the index
featureEnh: Add status counters to copy in verbose text output
featureEnh: Add Open Container Initiative labels to release Docker image
fixBugfix #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.
fixBugfix #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…
fixBugfix #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…
fixBugfix #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…
fixBugfix #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.
fixBugfix #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.
fixBugfix #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.
fixBugfix #5280: Make find --pack list blobs for tree packs The find --pack command now also reports blobs for packs that only contain tree blobs.
fixBugfix #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…
securityBugfix #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…
fixBugfix #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.
fixBugfix #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.
deprecatedChange #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.
featureEnhancement #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…
featureEnhancement #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.
featureEnhancement #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…
securityEnhancement #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…
featureThe 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.
featureEnhancement #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.
featureEnhancement #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…
+47 more items in the release notesfixFix: Correctly handle backup --stdin-filename with directory paths
fixFix: Accept RESTIC_HOST environment variable in forget command
fixFix: Ignore "chmod not supported" errors when writing files
fixFix: Ignore EOPNOTSUPP errors for extended attributes
fixFix: Fix rare crash if directory is removed during backup
fixFix: Stop retrying uploads when rest-server runs out of space
fixFix: Improve handling of download retries in check command
fixBugfix #5324: Correctly handle backup --stdin-filename with directory paths In restic 0.18.0, the backup command failed if a filename that includes at least a directory was passed to --stdin-filename. For example, --stdin-filename /foo/bar resulted in the following error: Fatal: unable to save…
fixBugfix #5325: Accept RESTIC_HOST environment variable in forget command The forget command did not use the host name from the RESTIC_HOST environment variable when filtering snapshots. This has now been fixed.
fixBugfix #5342: Ignore "chmod not supported" errors when writing files Restic 0.18.0 introduced a bug that caused chmod xxx: operation not supported errors to appear when writing to a local file repository that did not support chmod (like CIFS or WebDAV mounted via FUSE). Restic now ignores those…
fixBugfix #5344: Ignore EOPNOTSUPP errors for extended attributes Restic 0.18.0 added extended attribute support for NetBSD 10+, but not all NetBSD filesystems support extended attributes. Other BSD systems can likewise return EOPNOTSUPP, so restic now ignores these errors.
breakingBugfix #5421: Fix rare crash if directory is removed during backup In restic 0.18.0, the backup command could crash if a directory was removed between reading its metadata and listing its directory content. This has now been fixed.
fixBugfix #5429: Stop retrying uploads when rest-server runs out of space When rest-server returns a 507 Insufficient Storage error, it indicates that no more storage capacity is available. Restic now correctly stops retrying uploads in this case.
fixBugfix #5467: Improve handling of download retries in check command In very rare cases, the check command could unnecessarily report repository damage if the backend returned incomplete, corrupted data on the first download try which is afterwards resolved by a download retry. This could result in…
fixFix: Correctly restore long filepaths' timestamp on old Windows
fixFix: Ignore disappeared backup source files
fixFix: Include root tree when searching using find --tree
fixFix: Prevent Windows VSS event log 8194 warnings for backup with fs snapshot
fixFix: Fix duplicate data handling in prune --max-unused
fixFix: Fix creation of oversized index by repair index --read-all-packs
fixFix: Fix rare crash in command output
featureEnh: Add JSON support to check command
featureEnh: Allow excluding online-only cloud files (e.g. OneDrive)
featureEnh: Add sort option to ls command
featureEnh: Add support for Microsoft Blob Storage access tiers
featureEnh: Add snapshot summary statistics to rewritten snapshots
featureEnh: Add SLSA provenance to GHCR container images
featureEnh: Add retry mechanism for loading repository config
featureEnh: Allow including/excluding extended file attributes during restore
featureEnh: Add start and end timestamps to backup JSON output
featureEnh: Add DragonFlyBSD support
featureEnh: Add experimental S3 cold storage support
featureEnh: Add xattr support for NetBSD 10+
securitySecurity #5291: Mitigate attack on content-defined chunking algorithm Restic uses Rabin Fingerprints for its content-defined chunker. The algorithm relies on a secret polynomial to split files into chunks. As shown in the paper "Chunking Attacks on File Backup Services using Content-Defined…
fixBugfix #1843: Correctly restore long filepaths' timestamp on old Windows The restore command now correctly restores timestamps for files with paths longer than 256 characters on Windows versions prior to Windows 10 1607.
breakingBugfix #2165: Ignore disappeared backup source files The backup command now quietly skips files that are removed between directory listing and backup, instead of printing errors like: error: lstat /some/file/name: no such file or directory
securityBugfix #5169: Prevent Windows VSS event log 8194 warnings for backup with fs snapshot When running backup with the --use-fs-snapshot option in Windows with admin rights, event logs like Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr =…
featureChange #4938: Update dependencies and require Go 1.23 or newer We have updated all dependencies. Restic now requires Go 1.23 or newer to build. This also disables support for TLS versions older than TLS 1.2. On Windows, restic now requires at least Windows 10 or Windows Server 2016. On macOS,…
deprecatedChange #5162: Promote feature flags The deprecate-legacy-index, deprecate-s3-legacy-layout, explicit-s3-anonymous-auth and safe-forget-keep-tags features are now stable and can no longer be disabled. The corresponding feature flags will be removed in restic 0.19.0.
featureEnhancement #1378: Add JSON support to check command The check command now supports the --json option to output all statistics in JSON format.
featureEnhancement #3697: Allow excluding online-only cloud files (e.g. OneDrive) Restic treated files synced using OneDrive Files On-Demand as though they were regular files. This caused issues with VSS and could cause OneDrive to download all files. Restic now allows the user to exclude these files…
featureEnhancement #4179: Add sort option to ls command The ls -l command output can now be sorted using the new --sort option for the fields name, size, time (same as mtime), mtime, atime, ctime and extension. A --reverse option is also available.
featureEnhancement #4433: Change default sort order for find output The find command now sorts snapshots from newest to oldest by default. The previous oldest-to-newest order can be restored using the new --reverse option.
featureEnhancement #4521: Add support for Microsoft Blob Storage access tiers The new -o azure.access-tier= option allows specifying the access tier (Hot, Cool or Cold) for objects created in Microsoft Blob Storage. If unspecified, the storage account's default tier is used. There is no official Archive…
featureEnhancement #4942: Add snapshot summary statistics to rewritten snapshots The rewrite command now supports a --snapshot-summary option to add statistics data to snapshots. Only two fields in the summary will be non-zero: TotalFilesProcessed and TotalBytesProcessed. For snapshots rewritten using…
featureEnhancement #4983: Add SLSA provenance to GHCR container images Restic's GitHub Container Registry (GHCR) image build workflow now includes SLSA (Supply-chain Levels for Software Artifacts) provenance generation. Please see the restic documentation for more information about verifying SLSA…
featureEnhancement #5081: Add retry mechanism for loading repository config Restic now retries loading the repository config file when opening a repository. The init command now also retries backend operations.
featureEnhancement #5089: Allow including/excluding extended file attributes during restore The restore command now supports the --exclude-xattr and --include-xattr options to control which extended file attributes will be restored. By default, all attributes are restored.
featureEnhancement #5109: Make small pack size configurable for prune The prune command now supports the --repack-smaller-than option that allows repacking pack files smaller than a specified size.
featureEnhancement #5119: Add start and end timestamps to backup JSON output The JSON output of the backup command now includes backup_start and backup_end timestamps, containing the start and end time of the backup.
featureEnhancement #5131: Add DragonFlyBSD support Restic can now be compiled on DragonflyBSD.
featureEnhancement #5137: Make tag command print which snapshots were modified The tag command now outputs which snapshots were modified along with their new snapshot ID. The command supports the --json option for machine-readable output.
featureEnhancement #5173: Add experimental S3 cold storage support Introduce S3 backend options for transitioning pack files from cold to hot storage on S3 and S3-compatible providers. Note: this only works for the prune, copy and restore commands for now. This experimental feature is gated behind the…
featureEnhancement #5174: Add xattr support for NetBSD 10+ Extended attribute support for backup and restore operations is now available on NetBSD version 10 and later.
+24 more items in the release notesfixFix: Fix unusable mount on macOS Sonoma
fixFix: Fix metadata errors during backup of removable disks on Windows
fixFix: Do not retry load/list operation if SFTP connection is broken
fixFix: Fix metadata error on Windows for backups using VSS
featureEnh: Allow prune --dry-run without lock
fixBugfix #4971: Fix unusable mount on macOS Sonoma On macOS Sonoma when using FUSE-T, it was not possible to access files in a mounted repository. This issue is now resolved.
securityBugfix #5003: Fix metadata errors during backup of removable disks on Windows Since restic 0.17.0, backing up removable disks on Windows could report errors with retrieving metadata like shown below. error: incomplete metadata for d:\filename: get named security info failed with: Access is denied.…
fixBugfix #5101: Do not retry load/list operation if SFTP connection is broken When using restic with the SFTP backend, backend operations that load a file or list files were retried even if the SFTP connection was broken. This has now been fixed.…
fixBugfix #5107: Fix metadata error on Windows for backups using VSS Since restic 0.17.2, when creating a backup on Windows using --use-fs-snapshot, restic would report an error like the following: error: incomplete metadata for C:\: get EA failed while opening file handle for path…
featureEnhancement #5096: Allow prune --dry-run without lock The prune --dry-run --no-lock now allows performing a dry-run without locking the repository. Note that if the repository is modified concurrently, prune may return inaccurate statistics or errors.