restic v0.11.0 Release Notes

Release Date: 2020-11-05 // over 3 years ago
  • ⚡️ We're very pleased to present you restic 0.11.0! restic is distributed as a standalone binary: download the correct file for your operating system and architecture, extract the file and just run it. If you run into any issues, please report them at the GitHub issue tracker or visit the forum. If you already have restic >= 0.9.4, you can use restic self-update to get the latest version in a secure way.

    📚 The binaries released with each restic version are reproducible, which means that you can reproduce a byte identical version from the source code for that release. Instructions on how to do that in the Developer Documentation.

    🔄 Changelog for restic 0.11.0 (2020-11-05)

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

    Summary

    • 🛠 Fix #1212: Restore timestamps and permissions on intermediate directories
    • 🛠 Fix #1756: Mark repository files as read-only when using the local backend
    • 🛠 Fix #2241: Hide password in REST backend repository URLs
    • 🛠 Fix #2319: Correctly dump directories into tar files
    • 🛠 Fix #2491: Don't require self-update --output placeholder file
    • 🛠 Fix #2834: Fix rare cases of backup command hanging forever
    • 🛠 Fix #2938: Fix manpage formatting
    • 🛠 Fix #2942: Make --exclude-larger-than handle disappearing files
    • 🛠 Fix #2951: Restic generate, help and self-update no longer check passwords
    • 🛠 Fix #2979: Make snapshots --json output [] instead of null when no snapshots
    • ⚡️ Enh #2969: Optimize check for unchanged files during backup
    • 🏁 Enh #340: Add support for Volume Shadow Copy Service (VSS) on Windows
    • Enh #2849: Authenticate to Google Cloud Storage with access token
    • Enh #1458: New option --repository-file
    • Enh #2978: Warn if parent snapshot cannot be loaded during backup

    Details

    🛠 Bugfix #1212: Restore timestamps and permissions on intermediate directories

    ⏪ When using the --include option of the restore command, restic restored timestamps and permissions only on directories selected by the include pattern. Intermediate directories, which are necessary to restore files located in sub- directories, were created with default permissions. We've fixed the restore command to restore timestamps and permissions for these directories as well.

    #1212 #1402 #2906

    🛠 Bugfix #1756: Mark repository files as read-only when using the local backend

    🏁 Files stored in a local repository were marked as writeable on the filesystem for non-Windows systems, which did not prevent accidental file modifications outside of restic. In addition, the local backend did not work with certain filesystems and network mounts which do not permit modifications of file permissions.

    🏁 Restic now marks files stored in a local repository as read-only on the filesystem on non-Windows systems. The error handling is improved to support more filesystems.

    #1756 #2157 #2989

    🛠 Bugfix #2241: Hide password in REST backend repository URLs

    When using a password in the REST backend repository URL, the password could in some cases be included in the output from restic, e.g. when initializing a repo or during an error.

    The password is now replaced with "***" where applicable.

    #2241 #2658

    🛠 Bugfix #2319: Correctly dump directories into tar files

    🏁 The dump command previously wrote directories in a tar file in a way which can cause compatibility problems. This caused, for example, 7zip on Windows to not open tar files containing directories. In addition it was not possible to dump directories with extended attributes. These compatibility problems are now corrected.

    In addition, a tar file now includes the name of the owner and group of a file.

    #2319 #3039

    🛠 Bugfix #2491: Don't require self-update --output placeholder file

    ⚡️ restic self-update --output /path/to/new-restic used to require that new-restic was an existing file, to be overwritten. Now it's possible to download an updated restic binary to a new path, without first having to create a placeholder file.

    #2491 #2937

    🛠 Bugfix #2834: Fix rare cases of backup command hanging forever

    🛠 We've fixed an issue with the backup progress reporting which could cause restic to hang forever right before finishing a backup.

    #2834 #2963

    🛠 Bugfix #2938: Fix manpage formatting

    🛠 The manpage formatting in restic v0.10.0 was garbled, which is fixed now.

    #2938 #2977

    🛠 Bugfix #2942: Make --exclude-larger-than handle disappearing files

    🛠 There was a small bug in the backup command's --exclude-larger-than option where files that disappeared between scanning and actually backing them up to the repository caused a panic. This is now fixed.

    #2942

    🛠 Bugfix #2951: Restic generate, help and self-update no longer check passwords

    The commands restic cache, generate, help and self-update don't need passwords, but they previously did run the RESTIC_PASSWORD_COMMAND (if set in the environment), prompting users to authenticate for no reason. They now skip running the password command.

    #2951 #2987

    🛠 Bugfix #2979: Make snapshots --json output [] instead of null when no snapshots

    📜 Restic previously output null instead of [] for the --json snapshots command, when there were no snapshots in the repository. This caused some minor problems when parsing the output, but is now fixed such that [] is output when the list of snapshots is empty.

    #2979 #2984

    ✨ Enhancement #2969: Optimize check for unchanged files during backup

    During a backup restic skips processing files which have not changed since the last backup run. Previously this required opening each file once which can be slow on network filesystems. The backup command now checks for file changes before opening a file. This considerably reduces the time to create a backup on network filesystems.

    #2969 #2970

    ✨ Enhancement #340: Add support for Volume Shadow Copy Service (VSS) on Windows

    ⚡️ Volume Shadow Copy Service allows read access to files that are locked by another process using an exclusive lock through a filesystem snapshot. Restic was unable to backup those files before. This update enables backing up these files.

    This needs to be enabled explicitely using the --use-fs-snapshot option of the backup command.

    #340 #2274

    ✨ Enhancement #2849: Authenticate to Google Cloud Storage with access token

    When using the GCS backend, it is now possible to authenticate with OAuth2 access tokens instead of a credentials file by setting the GOOGLE_ACCESS_TOKEN environment variable.

    #2849

    ✨ Enhancement #1458: New option --repository-file

    We've added a new command-line option --repository-file as an alternative to -r. This allows to read the repository URL from a file in order to prevent certain types of information leaks, especially for URLs containing credentials.

    #1458 #2900 #2910

    ✨ Enhancement #2978: Warn if parent snapshot cannot be loaded during backup

    During a backup restic uses the parent snapshot to check whether a file was changed and has to be backed up again. For this check the backup has to read the directories contained in the old snapshot. If a tree blob cannot be loaded, restic now warns about this problem with the backup repository.

    #2978


Previous changes from v0.10.0

  • ⚡️ We're very pleased to present you restic 0.10.0! restic is distributed as a standalone binary: download the correct file for your operating system and architecture, extract the file and just run it. If you run into any issues, please report them at the GitHub issue tracker or visit the forum. If you already have restic >= 0.9.4, you can use restic self-update to get the latest version in a secure way.

    📚 The binaries released with each restic version are reproducible, which means that you can reproduce a byte identical version from the source code for that release. Instructions on how to do that in the Developer Documentation.

    🔄 Changelog for restic 0.10.0 (2020-09-19)

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

    Summary

    • 🛠 Fix #1863: Report correct number of directories processed by backup
    • 🛠 Fix #2254: Fix tar issues when dumping /
    • 🛠 Fix #2281: Handle format verbs like '%' properly in find output
    • 🛠 Fix #2298: Do not hang when run as a background job
    • 🛠 Fix #2389: Fix mangled json output of backup command
    • 🛠 Fix #2390: Refresh lock timestamp
    • Fix #2429: Backup --json reports total_bytes_processed as 0
    • 🛠 Fix #2469: Fix incorrect bytes stats in diff command
    • 🛠 Fix #2518: Do not crash with Synology NAS sftp server
    • 🛠 Fix #2531: Fix incorrect size calculation in stats --mode restore-size
    • 🛠 Fix #2537: Fix incorrect file counts in stats --mode restore-size
    • 🛠 Fix #2592: SFTP backend supports IPv6 addresses
    • Fix #2607: Honor RESTIC_CACHE_DIR environment variable on Mac and Windows
    • 🛠 Fix #2668: Don't abort the stats command when data blobs are missing
    • 🛠 Fix #2674: Add stricter prune error checks
    • 🛠 Fix #2899: Fix possible crash in the progress bar of check --read-data
    • 🚚 Chg #2482: Remove vendored dependencies
    • Chg #2546: Return exit code 3 when failing to backup all source data
    • ⚡️ Chg #2600: Update dependencies, require Go >= 1.13
    • 🔒 Chg #1597: Honor the --no-lock flag in the mount command
    • 👍 Enh #1570: Support specifying multiple host flags for various commands
    • ⚡️ Enh #1680: Optimize restic mount
    • Enh #2072: Display snapshot date when using restic find
    • Enh #2175: Allow specifying user and host when creating keys
    • 👍 Enh #2277: Add support for ppc64le
    • 🔀 Enh #2395: Ignore sync errors when operation not supported by local filesystem
    • Enh #2427: Add flag --iexclude-file to backup command
    • 👍 Enh #2569: Support excluding files by their size
    • Enh #2571: Self-heal missing file parts during backup of unchanged files
    • 👍 Enh #2858: Support filtering snapshots by tag and path in the stats command
    • Enh #323: Add command for copying snapshots between repositories
    • ⚡️ Enh #551: Use optimized library for hash calculation of file chunks
    • 🐎 Enh #2195: Simplify and improve restore performance
    • Enh #2328: Improve speed of check command
    • 📜 Enh #2423: Support user@domain parsing as user
    • Enh #2576: Improve the chunking algorithm
    • Enh #2598: Improve speed of diff command
    • Enh #2599: Slightly reduce memory usage of prune and stats commands
    • 👍 Enh #2733: S3 backend: Add support for WebIdentityTokenFile
    • ⚡️ Enh #2773: Optimize handling of new index entries
    • Enh #2781: Reduce memory consumption of in-memory index
    • ⚡️ Enh #2786: Optimize list blobs command
    • ⚡️ Enh #2790: Optimized file access in restic mount
    • Enh #2840: Speed-up file deletion in forget, prune and rebuild-index

    Details

    🛠 Bugfix #1863: Report correct number of directories processed by backup

    🛠 The directory statistics calculation was fixed to report the actual number of processed directories instead of always zero.

    #1863

    🛠 Bugfix #2254: Fix tar issues when dumping /

    🏁 We've fixed an issue with dumping either / or files on the first sublevel e.g. /foo to tar. This also fixes tar dumping issues on Windows where this issue could also happen.

    #2254 #2357 #2255

    🛠 Bugfix #2281: Handle format verbs like '%' properly in find output

    📦 The JSON or "normal" output of the find command can now deal with file names that contain substrings which the Golang fmt package considers "format verbs" like %s.

    #2281

    🛠 Bugfix #2298: Do not hang when run as a background job

    🔧 Restic did hang on exit while restoring the terminal configuration when it was started as a background job, for example using restic ... &. This has been fixed by only restoring the terminal configuration when restic is interrupted while reading a password from the terminal.

    #2298

    🛠 Bugfix #2389: Fix mangled json output of backup command

    🖨 We've fixed a race condition in the json output of the backup command that could cause multiple lines to get mixed up. We've also ensured that the backup summary is printed last.

    #2389 #2545

    🛠 Bugfix #2390: Refresh lock timestamp

    🔒 Long-running operations did not refresh lock timestamp, resulting in locks becoming stale. This is now fixed.

    #2390

    Bugfix #2429: Backup --json reports total_bytes_processed as 0

    We've fixed the json output of total_bytes_processed. The non-json output was already fixed with pull request #2138 but left the json output untouched.

    #2429

    🛠 Bugfix #2469: Fix incorrect bytes stats in diff command

    🛠 In some cases, the wrong number of bytes (e.g. 16777215.998 TiB) were reported by the diff command. This is now fixed.

    #2469

    🛠 Bugfix #2518: Do not crash with Synology NAS sftp server

    🛠 It was found that when restic is used to store data on an sftp server on a Synology NAS with a relative path (one which does not start with a slash), it may go into an endless loop trying to create directories on the server. We've fixed this bug by using a function in the sftp library instead of our own implementation.

    🙋 The bug was discovered because the Synology sftp server behaves erratic with non-absolute path (e.g. home/restic-repo). This can be resolved by just using an absolute path instead (/home/restic-repo). We've also added a paragraph in the FAQ.

    #2518 #2363 #2530

    🛠 Bugfix #2531: Fix incorrect size calculation in stats --mode restore-size

    ⏪ The restore-size mode of stats was counting hard-linked files as if they were independent.

    #2531

    🛠 Bugfix #2537: Fix incorrect file counts in stats --mode restore-size

    ⏪ The restore-size mode of stats was failing to count empty directories and some files with hard links.

    #2537

    🛠 Bugfix #2592: SFTP backend supports IPv6 addresses

    🔧 The SFTP backend now supports IPv6 addresses natively, without relying on aliases in the external SSH configuration.

    #2592

    Bugfix #2607: Honor RESTIC_CACHE_DIR environment variable on Mac and Windows

    On Mac and Windows, the RESTIC_CACHE_DIR environment variable was ignored. This variable can now be used on all platforms to set the directory where restic stores caches.

    #2607

    🛠 Bugfix #2668: Don't abort the stats command when data blobs are missing

    ⚙ Runing the stats command in the blobs-per-file mode on a repository with missing data blobs previously resulted in a crash.

    #2668

    🛠 Bugfix #2674: Add stricter prune error checks

    ➕ Additional checks were added to the prune command in order to improve resiliency to backend, hardware and/or networking issues. The checks now detect a few more cases where such outside factors could potentially cause data loss.

    #2674

    🛠 Bugfix #2899: Fix possible crash in the progress bar of check --read-data

    🏁 We've fixed a possible crash while displaying the progress bar for the check --read-data command. The crash occurred when the length of the progress bar status exceeded the terminal width, which only happened for very narrow terminal windows.

    👯 #2899 https://forum.restic.net/t/restic-rclone-pcloud-connection-issues/2963/15

    🔄 Change #2482: Remove vendored dependencies

    📚 We've removed the vendored dependencies (in the subdir vendor/). When building restic, the Go compiler automatically fetches the dependencies. It will also cryptographically verify that the correct code has been fetched by using the hashes in go.sum (see the link to the documentation below).

    #2482 https://golang.org/cmd/go/#hdr-Module_downloading_and_verification

    🔄 Change #2546: Return exit code 3 when failing to backup all source data

    The backup command used to return a zero exit code as long as a snapshot could be created successfully, even if some of the source files could not be read (in which case the snapshot would contain the rest of the files).

    This made it hard for automation/scripts to detect failures/incomplete backups by looking at the exit code. Restic now returns the following exit codes for the backup command:

    • 0 when the command was successful
    • 1 when there was a fatal error (no snapshot created)
    • 3 when some source data could not be read (incomplete snapshot created)

    #956 #2064 #2526 #2364 #2546

    ⚡️ Change #2600: Update dependencies, require Go >= 1.13

    🏗 Restic now requires Go to be at least 1.13. This allows simplifications in the build process and removing workarounds.

    🍎 This is also probably the last version of restic still supporting mounting repositories via fuse on macOS. The library we're using for fuse does not support macOS any more and osxfuse is not open source any more.

    #224 #590 #2600 #2852 #2927

    🔒 Change #1597: Honor the --no-lock flag in the mount command

    🔒 The mount command now does not lock the repository if given the --no-lock flag. This allows to mount repositories which are archived on a read only backend/filesystem.

    #1597 #2821

    ✨ Enhancement #1570: Support specifying multiple host flags for various commands

    Previously commands didn't take more than one --host or -H argument into account, which could be limiting with e.g. the forget command.

    ⏪ The dump, find, forget, ls, mount, restore, snapshots, stats and tag commands will now take into account multiple --host and -H flags.

    #1570

    ✨ Enhancement #1680: Optimize restic mount

    ⚡️ We've optimized the FUSE implementation used within restic. restic mount is now more responsive and uses less memory.

    #1680 #2587 #2787

    ✨ Enhancement #2072: Display snapshot date when using restic find

    ➕ Added the respective snapshot date to the output of restic find.

    #2072

    ✨ Enhancement #2175: Allow specifying user and host when creating keys

    0️⃣ When adding a new key to the repository, the username and hostname for the new key can be specified on the command line. This allows overriding the defaults, for example if you would prefer to use the FQDN to identify the host or if you want to add keys for several different hosts without having to run the key add command on those hosts.

    #2175

    ✨ Enhancement #2277: Add support for ppc64le

    ➕ Adds support for ppc64le, the processor architecture from IBM.

    #2277

    ✨ Enhancement #2395: Ignore sync errors when operation not supported by local filesystem

    🔀 The local backend has been modified to work with filesystems which doesn't support the sync operation. This operation is normally used by restic to ensure that data files are fully written to disk before continuing.

    🍎 For these limited filesystems, saving a file in the backend would previously fail with an "operation not supported" error. This error is now ignored, which means that e.g. an SMB mount on macOS can now be used as storage location for a repository.

    🔀 #2395 https://forum.restic.net/t/sync-errors-on-mac-over-smb/1859

    ✨ Enhancement #2427: Add flag --iexclude-file to backup command

    👍 The backup command now supports the flag --iexclude-file which is a case-insensitive version of --exclude-file.

    #2427 #2898

    ✨ Enhancement #2569: Support excluding files by their size

    👍 The backup command now supports the --exclude-larger-than option to exclude files which are larger than the specified maximum size. This can for example be useful to exclude unimportant files with a large file size.

    #2569 #2914

    ✨ Enhancement #2571: Self-heal missing file parts during backup of unchanged files

    We've improved the resilience of restic to certain types of repository corruption.

    For files that are unchanged since the parent snapshot, the backup command now verifies that all parts of the files still exist in the repository. Parts that are missing, e.g. from a damaged repository, are backed up again. This verification was already run for files that were modified since the parent snapshot, but is now also done for unchanged files.

    Note that restic will not backup file parts that are referenced in the index but where the actual data is not present on disk, as this situation can only be detected by restic check. Please ensure that you run restic check regularly.

    #2571 #2827

    ✨ Enhancement #2858: Support filtering snapshots by tag and path in the stats command

    ✅ We've added filtering snapshots by --tag tagList and by --path path to the stats command. This includes filtering of only 'latest' snapshots or all snapshots in a repository.

    #2858 #2859 https://forum.restic.net/t/stats-for-a-host-and-filtered-snapshots/3020

    ✨ Enhancement #323: Add command for copying snapshots between repositories

    We've added a copy command, allowing you to copy snapshots from one repository to another.

    Note that this process will have to read (download) and write (upload) the entire snapshot(s) due to the different encryption keys used on the source and destination repository. Also, the transferred files are not re-chunked, which may break deduplication between files already stored in the destination repo and files copied there using this command.

    👍 To fully support deduplication between repositories when the copy command is used, the init command now supports the --copy-chunker-params option, which initializes the new repository with identical parameters for splitting files into chunks as an already existing repository. This allows copied snapshots to be equally deduplicated in both repositories.

    #323 #2606 #2928

    ✨ Enhancement #551: Use optimized library for hash calculation of file chunks

    ⚡️ We've switched the library used to calculate the hashes of file chunks, which are used for deduplication, to the optimized Minio SHA-256 implementation.

    Depending on the CPU it improves the hashing throughput by 10-30%. Modern x86 CPUs with the SHA Extension should be about two to three times faster.

    #551 #2709

    ✨ Enhancement #2195: Simplify and improve restore performance

    🐎 Significantly improves restore performance of large files (i.e. 50M+): #2074 https://forum.restic.net/t/restore-using-rclone-gdrive-backend-is-slow/1112/8 https://forum.restic.net/t/degraded-restore-performance-s3-backend/1400

    🛠 Fixes "not enough cache capacity" error during restore: #2244

    ⏪ NOTE: This new implementation does not guarantee order in which blobs are written to the target files and, for example, the last blob of a file can be written to the file before any of the preceeding file blobs. It is therefore possible to have gaps in the data written to the target files if restore fails or interrupted by the user.

    🐎 The implementation will try to preallocate space for the restored files on the filesystem to prevent file fragmentation. This ensures good read performance for large files, like for example VM images. If preallocating space is not supported by the filesystem, then this step is silently skipped.

    #2195 #2893

    ✨ Enhancement #2328: Improve speed of check command

    We've improved the check command to traverse trees only once independent of whether they are contained in multiple snapshots. The check command is now much faster for repositories with a large number of snapshots.

    #2284 #2328

    ✨ Enhancement #2423: Support user@domain parsing as user

    ➕ Added the ability for user@domain-like users to be authenticated over SFTP servers.

    #2423

    ✨ Enhancement #2576: Improve the chunking algorithm

    ⚡️ We've updated the chunker library responsible for splitting files into smaller blocks. It should improve the chunking throughput by 5-15% depending on the CPU.

    #2820 #2576 #2845

    ✨ Enhancement #2598: Improve speed of diff command

    🐎 We've improved the performance of the diff command when comparing snapshots with similar content. It should run up to twice as fast as before.

    #2598

    ✨ Enhancement #2599: Slightly reduce memory usage of prune and stats commands

    The prune and the stats command kept directory identifiers in memory twice while searching for used blobs.

    #2599

    ✨ Enhancement #2733: S3 backend: Add support for WebIdentityTokenFile

    👍 We've added support for EKS IAM roles for service accounts feature to the S3 backend.

    #2703 #2733

    ✨ Enhancement #2773: Optimize handling of new index entries

    Restic now uses less memory for backups which add a lot of data, e.g. large initial backups. In addition, we've improved the stability in some edge cases.

    #2773

    ✨ Enhancement #2781: Reduce memory consumption of in-memory index

    We've improved how the index is stored in memory. This change can reduce memory usage for large repositories by up to 50% (depending on the operation).

    #2781 #2812

    ✨ Enhancement #2786: Optimize list blobs command

    We've changed the implementation of list blobs which should be now a bit faster and consume almost no memory even for large repositories.

    #2786

    ✨ Enhancement #2790: Optimized file access in restic mount

    Reading large (> 100GiB) files from restic mountpoints is now faster, and the speedup is greater for larger files.

    #2790

    ✨ Enhancement #2840: Speed-up file deletion in forget, prune and rebuild-index

    We've sped up the file deletion for the commands forget, prune and rebuild-index, especially for remote repositories. Deletion was sequential before and is now run in parallel.

    #2840