restic 0.18.0
Changelog for restic 0.18.0 (2025-03-27)
The following sections list the changes in restic 0.18.0 relevant to restic users. The changes are ordered by importance.
Summary
- Sec #5291: Mitigate attack on content-defined chunking algorithm
- Fix #1843: Correctly restore long filepaths' timestamp on old Windows
- Fix #2165: Ignore disappeared backup source files
- Fix #5153: Include root tree when searching using
find --tree - Fix #5169: Prevent Windows VSS event log 8194 warnings for backup with fs snapshot
- Fix #5212: Fix duplicate data handling in
prune --max-unused - Fix #5249: Fix creation of oversized index by
repair index --read-all-packs - Fix #5259: Fix rare crash in command output
- Chg #4938: Update dependencies and require Go 1.23 or newer
- Chg #5162: Promote feature flags
- Enh #1378: Add JSON support to
checkcommand - Enh #2511: Support generating shell completions to stdout
- Enh #3697: Allow excluding online-only cloud files (e.g. OneDrive)
- Enh #4179: Add
sortoption tolscommand - Enh #4433: Change default sort order for
findoutput - Enh #4521: Add support for Microsoft Blob Storage access tiers
- Enh #4942: Add snapshot summary statistics to rewritten snapshots
- Enh #4948: Format exit errors as JSON when requested
- Enh #4983: Add SLSA provenance to GHCR container images
- Enh #5054: Enable compression for ZIP archives in
dumpcommand - Enh #5081: Add retry mechanism for loading repository config
- Enh #5089: Allow including/excluding extended file attributes during
restore - Enh #5092: Show count of deleted files and directories during
restore - Enh #5109: Make small pack size configurable for
prune - Enh #5119: Add start and end timestamps to
backupJSON output - Enh #5131: Add DragonFlyBSD support
- Enh #5137: Make
tagcommand print which snapshots were modified - Enh #5141: Provide clear error message if AZURE_ACCOUNT_NAME is not set
- Enh #5173: Add experimental S3 cold storage support
- Enh #5174: Add xattr support for NetBSD 10+
- Enh #5251: Improve retry handling for flaky
rclonebackends - Enh #52897: Make
recoverautomatically rebuild index when needed
Details
-
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 Chunking" by Boris Alexeev, Colin Percival and Yan X Zhang, an attacker that can observe chunk sizes for a known file can derive the secret polynomial. Knowledge of the polynomial might in some cases allow an attacker to check whether certain large files are stored in a repository.
A practical attack is nevertheless hard as restic merges multiple chunks into opaque pack files and by default processes multiple files in parallel. This likely prevents an attacker from matching pack files to the attacker-known file and thereby prevents the attack.
Despite the low chances of a practical attack, restic now has added mitigation that randomizes how chunks are assembled into pack files. This prevents attackers from guessing which chunks are part of a pack file and thereby prevents learning the chunk sizes.
-
Bugfix #1843: Correctly restore long filepaths' timestamp on old Windows
The
restorecommand now correctly restores timestamps for files with paths longer than 256 characters on Windows versions prior to Windows 10 1607. -
Bugfix #2165: Ignore disappeared backup source files
The
backupcommand 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 -
Bugfix #5153: Include root tree when searching using
find --treeThe
restic find --treecommand did not find trees referenced byrestic snapshot --json. It now correctly includes the root tree when searching. -
Bugfix #5169: Prevent Windows VSS event log 8194 warnings for backup with fs snapshot
When running
backupwith the--use-fs-snapshotoption in Windows with admin rights, event logs likeVolume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr = 0x80070005, Access is denied. . This is often caused by incorrect security settings in either the writer or requester process. Operation: Gathering Writer Data Context: Writer Class Id: {e8132975-6f93-4464-a53e-1050253ae220} Writer Name: System Writer Writer Instance ID: {54b151ac-d27d-4628-9cb0-2bc40959f50f}Are created several times even though the backup itself succeeds. This has now been fixed.
#5169 #5170 https://forum.restic.net/t/windows-shadow-copy-snapshot-vss-unexpected-provider-error/3674/2
-
Bugfix #5212: Fix duplicate data handling in
prune --max-unusedThe
prune --max-unused sizecommand did not correctly account for duplicate data. If a repository contained a large amount of duplicate data, this could previously result in pruning too little data. This has now been fixed.#5212 https://forum.restic.net/t/restic-not-obeying-max-unused-parameter-on-prune/8879
-
Bugfix #5249: Fix creation of oversized index by
repair index --read-all-packsSince restic 0.17.0, the new index created by
repair index --read-all-packswas written as a single large index. This significantly increased memory usage while loading the index.The index is now correctly split into multiple smaller indexes, and
repair indexnow also automatically splits oversized indexes. -
Bugfix #5259: Fix rare crash in command output
Some commands could in rare cases crash when trying to print status messages and request retries at the same time, resulting in an error like the following:
panic: runtime error: slice bounds out of range [468:156] [...] github.com/restic/restic/internal/ui/termstatus.(*lineWriter).Write(...) /restic/internal/ui/termstatus/stdio_wrapper.go:36 +0x136This has now been fixed.
-
Change #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, restic now requires at least macOS 11 Big Sur.
-
Change #5162: Promote feature flags
The
deprecate-legacy-index,deprecate-s3-legacy-layout,explicit-s3-anonymous-authandsafe-forget-keep-tagsfeatures are now stable and can no longer be disabled. The corresponding feature flags will be removed in restic 0.19.0. -
Enhancement #1378: Add JSON support to
checkcommandThe
checkcommand now supports the--jsonoption to output all statistics in JSON format. -
Enhancement #2511: Support generating shell completions to stdout
The
generatecommand now supports using-as the filename with the--[shell]-completionoption to write the generated output to stdout. -
Enhancement #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 when backing up with the
--exclude-cloud-filesoption. -
Enhancement #4179: Add
sortoption tolscommandThe
ls -lcommand output can now be sorted using the new--sort <field>option for the fieldsname,size,time(same asmtime),mtime,atime,ctimeandextension. A--reverseoption is also available. -
Enhancement #4433: Change default sort order for
findoutputThe
findcommand now sorts snapshots from newest to oldest by default. The previous oldest-to-newest order can be restored using the new--reverseoption. -
Enhancement #4521: Add support for Microsoft Blob Storage access tiers
The new
-o azure.access-tier=<tier>option allows specifying the access tier (Hot,CoolorCold) for objects created in Microsoft Blob Storage. If unspecified, the storage account's default tier is used.There is no official
Archivestorage support in restic, use this option at your own risk. To restore any data, it is necessary to manually warm up the required data in theArchivetier. -
Enhancement #4942: Add snapshot summary statistics to rewritten snapshots
The
rewritecommand now supports a--snapshot-summaryoption to add statistics data to snapshots. Only two fields in the summary will be non-zero:TotalFilesProcessedandTotalBytesProcessed.For snapshots rewritten using the
--excludeoptions, the summary statistics are updated accordingly. -
Enhancement #4948: Format exit errors as JSON when requested
Restic now formats error messages as JSON when the
--jsonflag is used. -
Enhancement #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 provenance.
-
Enhancement #5054: Enable compression for ZIP archives in
dumpcommandThe
dumpcommand now compresses ZIP archives using the DEFLATE algorithm, reducing the size of exported archives. -
Enhancement #5081: Add retry mechanism for loading repository config
Restic now retries loading the repository config file when opening a repository. The
initcommand now also retries backend operations. -
Enhancement #5089: Allow including/excluding extended file attributes during
restoreThe
restorecommand now supports the--exclude-xattrand--include-xattroptions to control which extended file attributes will be restored. By default, all attributes are restored. -
Enhancement #5092: Show count of deleted files and directories during
restoreThe
restorecommand now reports the number of deleted files and directories, both in the regular output and in thefiles_deletedfield of the JSON output. -
Enhancement #5109: Make small pack size configurable for
pruneThe
prunecommand now supports the--repack-smaller-thanoption that allows repacking pack files smaller than a specified size. -
Enhancement #5119: Add start and end timestamps to
backupJSON outputThe JSON output of the
backupcommand now includesbackup_startandbackup_endtimestamps, containing the start and end time of the backup. -
Enhancement #5131: Add DragonFlyBSD support
Restic can now be compiled on DragonflyBSD.
-
Enhancement #5137: Make
tagcommand print which snapshots were modifiedThe
tagcommand now outputs which snapshots were modified along with their new snapshot ID. The command supports the--jsonoption for machine-readable output. -
Enhancement #5141: Provide clear error message if AZURE_ACCOUNT_NAME is not set
If
AZURE_ACCOUNT_NAMEwas not set, commands related to an Azure repository would result in a misleading networking error. Restic now detect this and provides a clear warning that the variable is not defined. -
Enhancement #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,copyandrestorecommands for now.This experimental feature is gated behind the "s3-restore" feature flag.
-
Enhancement #5174: Add xattr support for NetBSD 10+
Extended attribute support for
backupandrestoreoperations is now available on NetBSD version 10 and later. -
Enhancement #5251: Improve retry handling for flaky
rclonebackendsSince restic 0.17.0, the backend retry mechanisms rely on backends correctly reporting when a file does not exist. This is not always the case for some
rclonebackends, which caused restic to stop retrying after the first failure.For rclone, failed requests are now retried up to 5 times before giving up.
-
Enhancement #52897: Make
recoverautomatically rebuild index when neededWhen trying to recover data from an interrupted snapshot, it was previously necessary to manually run
repair indexbefore runnningrecover. This now happens automatically so that onlyrecoveris necessary.