Michael Eischer
ca1e5e10b6
add proper constants for node type
2024-08-31 18:20:01 +02:00
Michael Eischer
7bb92dc7bd
archiver: use ExtendedStat from FS interface
...
With this change, NodeFromFileInfo is the last function that bypasses
the FS interface in the archiver.
2024-08-31 18:05:09 +02:00
Michael Eischer
70fbad6623
archiver: minimize imports
2024-08-31 18:04:37 +02:00
Michael Eischer
6fd5d5f2d5
archiver: move helper functions to combine rejects
2024-08-31 18:04:22 +02:00
Michael Eischer
f1585af0f2
move include/exclude options to filter package
2024-08-31 18:04:07 +02:00
Michael Eischer
41c031a19e
backup: move RejectFuncs to archiver package
2024-08-31 18:03:35 +02:00
Michael Eischer
f9dbcd2531
backup: convert reject funcs to use FS interface
...
Depending on parameters the paths in a snapshot do not directly
correspond to real paths on the filesystem. Therefore, reject funcs must
use the FS interface to work correctly.
2024-08-31 18:03:02 +02:00
Michael Eischer
c6fae0320e
archiver: hide implementation details
2024-08-31 17:52:45 +02:00
Michael Eischer
507842b614
fs: remove Open method from FS interface
2024-08-31 17:37:25 +02:00
Michael Eischer
0ddb4441d7
fs: clean up helper functions
2024-08-31 17:37:25 +02:00
Michael Eischer
b9b32e5647
restic: extract Node filesystem code to fs package
2024-08-31 17:37:25 +02:00
Michael Eischer
4fcedb4bae
backup: support specifying volume instead of path on Windows
...
"C:" (volume name) versus "C:\" (path)
2024-08-30 11:35:43 +02:00
Michael Eischer
73c9780321
backup: store but warn if extended metadata for item is incomplete
...
Files were not included in the backup if the extended metadata for the
file could not be read. This is rather drastic. Instead settle on
returning a warning but still including the file in the backup.
2024-08-03 22:25:29 +02:00
Michael Eischer
729e009485
replace all uses of target in relation to backup
2024-07-24 19:40:53 +02:00
Michael Eischer
1369658a32
archiver: extract Readdirnames to fs package
2024-07-05 21:03:34 +02:00
Michael Eischer
6869bdaaa8
backup: implement --skip-if-unchanged
2024-05-30 15:14:31 +02:00
Michael Eischer
6ca12c1b4a
archiver: replace most uses of restic.Repository
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
0bb0720348
test cleanups
2024-05-24 21:33:17 +02:00
Michael Eischer
c01bcb1001
archiver: remove unused masterIndex from test
2024-05-24 21:33:17 +02:00
Michael Eischer
0aa5c53842
repository: replace HasBlob with LookupBlobSize
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
8a425c2f0a
remove usages of repo.Backend() from tests
2024-05-18 21:42:51 +02:00
Michael Eischer
31624aeffd
Improve command shutdown on context cancellation
2024-04-22 22:31:38 +02:00
Michael Eischer
b15d867414
Merge pull request #4763 from MichaelEischer/refactor-prune
...
Refactor repair index / prune into the repository package
2024-04-22 22:24:53 +02:00
Michael Eischer
7ba5e95a82
check: allow tests to only verify pack&index integrity
2024-04-14 13:45:04 +02:00
Michael Eischer
bf054c09d2
backup: Ignore xattr.list permission error for parent directories
...
On FreeBSD, limited users may not be able to even list xattrs for the
parent directories above the snapshot source paths. As this can cause
the backup to fail, just ignore those errors.
2024-04-10 20:46:15 +02:00
Michael Eischer
ec2b79834a
use consistent alias for interal/test package
2024-03-29 00:24:03 +01: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
Michael Eischer
d705741571
backup: test that deviceID is only stored for hardlinks
2024-03-28 19:32:50 +01:00
Michael Eischer
a26d6ffa72
archiver: move deviceID handling behind feature flag
2024-03-28 19:12:07 +01:00
Michael Eischer
2ba21fe72b
archiver: only store deviceID for hardlinks
...
The deviceID can change e.g. when backing up from filesystem snapshot.
It is only used for hardlink detection. Thus there it is not necessary
to store it for everything else.
2024-03-28 19:12:07 +01:00
Michael Eischer
e71660cd1e
backup: rename data_added_in_repo statistic to data_added_packed
2024-02-25 20:40:52 +01:00
Michael Eischer
a8f5684f68
archiver: test statistics in snapshot
2024-02-23 22:05:15 +01:00
Michael Eischer
681395955e
archiver: test backup summary calculation
2024-02-23 21:46:39 +01:00
Michael Eischer
38f91d3b5e
backup: store statistics in snapshot
2024-02-23 20:27:13 +01:00
Michael Eischer
a59f654fa6
archiver: refactor summary collection from ui into the archiver
2024-02-23 20:27:13 +01:00
Michael Eischer
8b1a85711f
archiver: unexport save/saveDir/saveTree methods
2024-02-23 20:24:21 +01:00
Michael Eischer
5b5d506472
backup: report files whose chunks failed to upload
2024-02-11 22:43:26 +01:00
Alexander Neumann
c0514dd8ba
Fix linter errors (except for tests)
2024-02-10 22:58:10 +01:00
Michael Eischer
16e3f79e8b
repository: make repo.Options configurable for test repos
2024-02-03 18:22:47 +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
51419c51d3
archiver: Add filepath to error message if it is not included yet
2024-01-06 19:08:24 +01:00
Michael Eischer
6b79834cc8
archiver: improve error message for irregular files
...
Since Go 1.21, most reparse points are considered as irregular files.
Depending on the underlying driver these can exhibit nearly arbitrary
behavior. When encountering such a file, restic returned an
indecipherable error message: `error: invalid node type ""`.
Add the filepath to the error message and state that the file type is
not supported.
2024-01-06 19:03:11 +01:00
Andrea Gelmini
241916d55b
Fix typos
2023-12-06 13:11:55 +01:00
Michael Eischer
ee305e6041
backup: rework error reporting for subcommand
2023-10-27 23:58:52 +02:00
Enrico204
4e5caab114
stdin-from-command: implemented suggestions in #4254
...
The code has been refactored so that the archiver is back to the original code, and the stderr is handled using a go routine to avoid deadlock.
2023-10-27 23:58:51 +02:00
Sebastian Hoß
c133065a9f
Check command result before snapshotting
...
Return with an error containing the stderr of the given command in case it fails. No new snapshot will be created and future prune operations on the repository will remove the unreferenced data.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Sebastian Hoß
25350a9c55
Extend SnapshotOptions w/ command data
...
In order to determine whether to save a snapshot, we need to capture the exit code returned by a command. In order to provide a nice error message, we supply stderr as well.
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
2023-10-27 23:58:51 +02:00
Michael Eischer
1b8a67fe76
move Backend interface to backend package
2023-10-25 23:00:18 +02:00