1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-24 08:44:52 +00:00
restic/internal/backend
Alexander Neumann b5062959c8 backend: Relax requirement for new files
Before, all backend implementations were required to return an error if
the file that is to be written already exists in the backend. For most
backends, that means making a request (e.g. via HTTP) and returning an
error when the file already exists.

This is not accurate, the file could have been created between the HTTP
request testing for it, and when writing starts. In addition, apart from
the `config` file in the repo, all other file names have pseudo-random
names with a very very low probability of a collision. And even if a
file name is written again, the way the restic repo is structured this
just means that the same content is placed there again. Which is not a
problem, just not very efficient.

So, this commit relaxes the requirement to return an error when the file
in the backend already exists, which allows reducing the number of API
requests and thereby the latency for remote backends.
2018-02-17 22:39:18 +01:00
..
azure backend: Relax requirement for new files 2018-02-17 22:39:18 +01:00
b2 backend: Relax requirement for new files 2018-02-17 22:39:18 +01:00
gs backend: Relax requirement for new files 2018-02-17 22:39:18 +01:00
local Change List() implementation for all backends 2018-01-21 21:15:09 +01:00
location s3: Remove default prefix "/restic" 2017-11-21 21:33:09 +01:00
mem Fix calls to repo/backend.List() everywhere 2018-01-21 21:15:09 +01:00
rest Read TLS client cert and key from the same file 2018-01-27 14:02:01 +01:00
s3 backend: Relax requirement for new files 2018-02-17 22:39:18 +01:00
sftp sftp: Allow running ssh without a tty 2018-01-26 19:21:14 +01:00
swift backend: Relax requirement for new files 2018-02-17 22:39:18 +01:00
test backend: Relax requirement for new files 2018-02-17 22:39:18 +01:00
testdata Moves files 2017-07-23 14:19:13 +02:00
backend_error.go backend: Add partial read failure to error backend 2017-10-17 22:11:38 +02:00
backend_retry.go Implement RetryBackend.List() 2018-01-29 22:14:12 -05:00
backend_retry_test.go Implement RetryBackend.List() 2018-01-29 22:14:12 -05:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
http_transport.go Read TLS client cert and key from the same file 2018-01-27 14:02:01 +01:00
layout.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_default.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_rest.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_s3legacy.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
paths.go Moves files 2017-07-23 14:19:13 +02:00
semaphore.go swift backend: fix premature release of semaphore in Load() & document 2017-11-02 12:38:17 -04:00
utils.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
utils_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00