restic/internal/restic
Alexander Neumann 93210614f4 backend/retry: return worker function error and abort
This is a bug fix: Before, when the worker function fn in List() of the
RetryBackend returned an error, the operation is retried with the next
file. This is not consistent with the documentation, the intention was
that when fn returns an error, this is passed on to the caller and the
List() operation is aborted. Only errors happening on the underlying
backend are retried.

The error leads to restic ignoring exclusive locks that are present in
the repo, so it may happen that a new backup is written which references
data that is going to be removed by a concurrently running `prune`
operation.

The bug was reported by a user here:
https://forum.restic.net/t/restic-backup-returns-0-exit-code-when-already-locked/484
2018-02-24 13:26:13 +01:00
..
testdata Update golden files 2017-09-11 17:52:22 +02:00
backend.go Reworked Backend.Load API to retry errors during ongoing download 2018-02-16 21:12:14 -05:00
backend_find.go backend: Rework List() 2018-01-21 18:35:37 +01:00
backend_find_test.go backend: Rework List() 2018-01-21 18:35:37 +01:00
blob.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob_set.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
buffer.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
cache.go Automatically exclude current restic cache 2017-09-24 21:54:53 +02:00
config.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
config_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
doc.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
file.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
file_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
find.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
find_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
hardlinks_index.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
hardlinks_index_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
id.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_int_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
ids.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
ids_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock.go backend/retry: return worker function error and abort 2018-02-24 13:26:13 +01:00
lock_test.go Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
lock_unix.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock_windows.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node.go repository/master_index: Optimize Index.Lookup() 2018-01-23 22:25:56 -05:00
node_darwin.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_freebsd.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_linux.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_openbsd.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_test.go Disable the 'testSticky' test on OpenBSD. Only root can set sticky. 2018-02-11 07:46:31 -07:00
node_unix.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_unix_test.go Add argument to Skipf() 2018-01-17 23:14:37 +01:00
node_windows.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_xattr.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
progress.go Control progress rate with RESTIC_PROGRESS_FPS env 2017-10-26 14:46:56 +08:00
progress_unix.go Handle SIGINFO on all supported platforms 2017-09-02 22:06:31 +03:00
progress_unix_with_siginfo.go Handle SIGINFO on all supported platforms 2017-09-02 22:06:31 +03:00
rand_reader.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
readerat.go Reworked Backend.Load API to retry errors during ongoing download 2018-02-16 21:12:14 -05:00
repository.go Merge pull request #1549 from MJDSys/more_index_lookup_avoids 2018-01-24 20:53:30 +01:00
restorer.go debug: Remove manual Str() call Log() 2018-01-25 20:49:41 +01:00
restorer_test.go restorer: Set directory mode as last step 2018-01-07 15:13:24 +01:00
snapshot.go Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
snapshot_find.go Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
snapshot_policy.go removed unnacessary line 2017-09-10 10:41:07 +02:00
snapshot_policy_test.go added test cases 2017-09-10 12:23:28 +02:00
snapshot_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
tag_list.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
testing.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
testing_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
tree.go Allow sorting nodes in trees 2017-09-22 12:37:05 +02:00
tree_test.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00