1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-30 00:00:14 +01:00
restic/internal/archiver
Jeremy Fleischman ace495ea99
fs: error if a symlink points at a file that is not included in the snapshot
This implements @fd0's first idea here:
<https://github.com/restic/restic/issues/542#issuecomment-328263959>.

> First, I think it may be a good idea to print a warning message when a
> symlinks is saved and the target of the symlink exists and is not
> included in the backup. This way, users will know that some data
> referenced in the snapshot is not available upon restore.

Which I wholeheartedly agree with.

In the interest of keeping restic's cli simple, and keeping people's
data safe, I've opted to not make this configurable. I suppose you could
call this a breaking change, but I personally consider it a fix: restic
shouldn't claim it has successfully backed up a directory unless it can
actually recreate the structure of that directory. IMO, it's better to
fail-fast than to claim success, only to greatly disappoint someone
later on.
2024-12-20 03:18:10 -08:00
..
archiver.go fs: error if a symlink points at a file that is not included in the snapshot 2024-12-20 03:18:10 -08:00
archiver_test.go fs: remove os.FileInfo from fs.ExtendedFileInfo 2024-11-30 17:07:36 +01:00
archiver_unix_test.go fs: remove os.FileInfo from fs.ExtendedFileInfo 2024-11-30 17:07:36 +01:00
blob_saver.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
blob_saver_test.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
buffer.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
doc.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
exclude.go fs: remove os.FileInfo from fs.ExtendedFileInfo 2024-11-30 17:07:36 +01:00
exclude_test.go fs: inline ExtendedStat 2024-11-30 16:19:16 +01:00
file_saver.go fs / archiver: convert to handle based interface 2024-11-16 12:56:23 +01:00
file_saver_test.go fs / archiver: convert to handle based interface 2024-11-16 12:56:23 +01:00
scanner.go fs: remove os.FileInfo from fs.ExtendedFileInfo 2024-11-30 17:07:36 +01:00
scanner_test.go fs: remove os.FileInfo from fs.ExtendedFileInfo 2024-11-30 17:07:36 +01:00
testing.go minimize usage of internal/fs in tests 2024-08-31 18:20:41 +02:00
testing_test.go minimize usage of internal/fs in tests 2024-08-31 18:20:41 +02:00
tree.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
tree_saver.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
tree_saver_test.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00
tree_test.go archiver: hide implementation details 2024-08-31 17:52:45 +02:00