Michael Eischer
ae978d60cc
restore: pass action enum to restore progress
2024-07-05 20:41:27 +02:00
Michael Eischer
83351f42e3
restore: add dry-run support
2024-07-05 20:41:27 +02:00
Michael Eischer
c47bf33884
restore: print processed files at maximum verbosity
2024-07-05 20:41:27 +02:00
Viktor Szépe
ac00229386
Fix typos
2024-07-03 20:02:06 +02:00
Michael Eischer
9572b7224f
restorer: windows test fixes
2024-06-13 23:20:09 +02:00
Michael Eischer
ca41c8fd11
restore: use fs function wrappers
...
This ensures proper path handling on Windows.
2024-06-13 22:40:37 +02:00
Michael Eischer
ebbd4e26d7
restorer: allow directory to replace existing file
2024-06-13 21:57:48 +02:00
Michael Eischer
ac729db3ce
restorer: fix overwriting of special file types
...
An attempt to replace an existing file with a hardlink previously ended
with a missing file.
Remove an existing file before trying to restore a special node. This
generalizes the existing behavior for symlinks to all special node
types.
2024-06-13 21:56:18 +02:00
Michael Eischer
c7902b7724
restorer: cleanup overwrite tests
2024-06-13 21:55:33 +02:00
Michael Eischer
c598a751c2
restore: fine-grained sparse support for windows
2024-06-13 21:55:33 +02:00
Michael Eischer
d265ec64f2
restore: correctly handle existing hardlinks
...
With hardlinks there's no efficient way to detect which files are linked
with each other. Thus, just start from scratch when restore has to
modify a hardlinked file.
2024-06-13 21:55:33 +02:00
Michael Eischer
f19b69af25
restore: allow overwrite to replace empty directories and symlinks
...
With an already existing file tree an old directory or symlink may exist
in a place where restore wants to create a new file. Thus, check for
unexpected file types and clean up if necessary.
2024-06-13 21:55:33 +02:00
Michael Eischer
f1c76a8286
restore: fix corrupted sparse files
2024-06-13 21:17:30 +02:00
Michael Eischer
1eccd6504b
restore: test restore only changed parts functionality
2024-06-13 21:17:30 +02:00
Michael Eischer
5c3709e17a
restore: add --overwrite=if-changed to skip files if their mtime&size matches
...
--overwrite=always still checks the file content
2024-06-13 21:17:30 +02:00
Michael Eischer
a66658b4c9
restore: only restore changed file parts
...
For files that should be overwritten, first check whether their content
matches the snapshot and only restore diverging parts.
2024-06-13 21:17:30 +02:00
Michael Eischer
62e0e5e8d8
restore: cleanup options handling
2024-06-12 22:53:53 +02:00
Michael Eischer
8aa3ab6ef8
restore: check file type in verify
2024-06-12 22:53:53 +02:00
Michael Eischer
7f7c995977
fix linter warnings
2024-06-12 22:36:52 +02:00
Michael Eischer
ba53a2abb5
test overwrite behavior
2024-06-12 22:36:52 +02:00
Michael Eischer
e47e08a688
restorer: separately track skipped files
2024-06-12 22:36:52 +02:00
Michael Eischer
6a4ae9d6b1
restore: configurable overwrite behavior
2024-06-12 22:36:52 +02:00
Michael Eischer
a23cb3a428
restore: reduce memory usage
2024-06-12 22:36:52 +02:00
Michael Eischer
2b50c2606c
restorer: use options struct
2024-06-12 22:36:52 +02:00
Michael Eischer
0fcd89f892
restorer: remove special case for blobs with many occurrences
...
Loading blobs by now is no longer prone to timeouts when processing
takes a long time.
2024-06-12 22:36:52 +02:00
Michael Eischer
fd2ff464a2
restorer: remove stale comment
2024-06-12 22:36:52 +02:00
Michael Eischer
607daeed4f
restore: move nil pointer check into restoreui
2024-06-12 22:36:52 +02:00
Michael Eischer
30320a249a
restore: let filerestorer also handle empty files
...
This get's rid of the corresponding special cases.
2024-06-12 22:36:52 +02:00
Michael Eischer
c166ad7daf
restore: factor out file creation helper
2024-06-12 22:36:52 +02:00
Michael Eischer
864995271e
repository: unwrap BlobHandle parameters of LookupBlob
...
The method now uses the same parameters as LookupBlobSize.
2024-05-24 21:33:17 +02:00
Michael Eischer
1266a4932f
repository: fix parameter order of LookupBlobSize
...
All methods should use blobType followed by ID.
2024-05-24 21:33:17 +02:00
Michael Eischer
4df887406f
repository: inline MasterIndex interface into Repository interface
2024-05-24 21:33:17 +02:00
Michael Eischer
7f9ad1c3db
Merge pull request #4705 from MichaelEischer/snapshot-statistics
...
Store snapshot statistics & print snapshot size
2024-03-28 22:41:45 +01:00
avoidalone
ac948fccda
fix some typos
...
Signed-off-by: avoidalone <wuguangdong@outlook.com>
2024-03-11 14:35:12 +08:00
Michael Eischer
a59f654fa6
archiver: refactor summary collection from ui into the archiver
2024-02-23 20:27:13 +01:00
Aneesh Nireshwalia
4bbd25a37f
Add tests for generic attribute changes
2024-02-22 17:55:50 -07:00
Aneesh Nireshwalia
d4be734c73
Handle readonly empty files in windows
2024-02-22 17:54:43 -07:00
Aneesh Nireshwalia
eeb1aa5388
Add ability to report warnings to terminal
...
Report warnings to terminal when unrecognized generic attributes are found in the repository.
2024-02-22 17:52:26 -07:00
Aneesh Nireshwalia
0962917974
Support windows metadata using generic attribs
...
Add new generic_attributes attribute in Node.
Use the generic attributes to add support for creation time and file attributes like hidden, readonly, encrypted in windows. Handle permission errors for readonly files in windows.
Handle backup and restore of encrypted attributes using windows system calls.
2024-02-22 17:31:20 -07:00
Alexander Neumann
c0514dd8ba
Fix linter errors (except for tests)
2024-02-10 22:58:10 +01:00
Michael Eischer
bfb56b78e1
replace some usages of restic.Repository with more specific interface
...
This should eventually make it easier to test the code.
2024-01-27 13:02:02 +01:00
Michael Eischer
2c310a526e
repository: Replace StreamPack function with LoadBlobsFromPack method
...
LoadBlobsFromPack is now part of the repository struct. This ensures
that users of that method don't have to deal will internals of the
repository implementation.
The filerestorer tests now also contain far fewer pack file
implementation details.
2024-01-19 21:40:43 +01:00
Michael Eischer
e78be75d1e
restore: separately restore blobs that are frequently referenced
...
Writing these blobs to their files can take a long time and consequently
cause the backend connection to time out. Avoid that by retrieving these
blobs separately.
2024-01-08 21:00:13 +01:00
Michael Eischer
2267910418
restore: split error reporting from downloadPack
2024-01-08 20:57:00 +01:00
Michael Eischer
00d18b7a88
restore: cleanup downloadPack
2024-01-08 20:53:08 +01:00
Michael Eischer
9328f34d43
restore: split downloadPack into smaller methods
2024-01-08 20:52:36 +01:00
Michael Eischer
dac3508170
restore: only report errors for blobs that actually failed to load
...
Previously, errors would be reported for all blobs of a packfile that
failed to stream. Now, only the not yet processed blobs are reported.
2024-01-07 10:54:56 +01:00
Michael Eischer
53ebe91a50
Move changelog typo fixes to changelog files
2023-12-23 14:05:47 +01:00
Andrea Gelmini
241916d55b
Fix typos
2023-12-06 13:11:55 +01:00
Michael Eischer
a8fdcf79b7
restorer: Make hardlink index generic
...
This will allow reusing it for the stats command without regressing the
memory usage due to storing an unnecessary file path.
2023-10-27 23:40:42 +02:00