Comments (7)
Update:
The source repository was missing the folder locks
(but was working just fine!) Maybe Minio S3 deletes empty folders? I don't know ...
However, reading this thread, I was tempted to create the locks
folder manually on the NFS share by running this command: $ mkdir -p locks
This resolved my issue and the repository can now be used by restic accessing via rest-server
.
My conclusion at this point is that my restic client refuses to work with rest-server
if the folder locks
is missing in the repo. This is not the case if using Minio S3 as backend.
from rest-server.
A short summary is that restic expects the repository to be what it should be. If you or something else deletes parts of the repository that init created, then you may run into issues. In this case the problem was that the copy of the repository wasn't complete.
from rest-server.
In this case the problem was that the copy of the repository wasn't complete.
Then I'm asking the question of how restic is able to use the repository when accessing via S3. All of my repositories were in use via S3 until yesterday and restic never complained about a missing locks
folder.
(I still have the S3 buckets on the original storage and can see that the folder is missing in every repository.)
from rest-server.
I've created a minimal working example to reproduce this: restic does not create a lock
folder if it uses a S3 backend for the repository. I used the newest release from GitHub and ran restic init
as well as restic --verbose backup .
.
Should I open a new issue at the main repo?
from rest-server.
Update: I found a similar issue and posted a comment.
from rest-server.
The source repository was missing the folder
locks
(but was working just fine!) Maybe Minio S3 deletes empty folders?
S3 uses a flat namespace, it has no concept of folders. Files in a "folder" are just files with a corresponding prefix. It is possible to simulate folders with empty placeholder files. But restic doesn't create those files. Thus, copying a repository from S3 won't include these folders.
restic ignores empty folders (see https://github.com/restic/restic/blob/bfc9c6c9712054366ae6cf1dd66839bb17359e44/internal/backend/local/local.go#L258 ), thus there's no reason why the rest-server shouldn't do the same.
@maxkratz the issue in restic is specific for the 'local' backend. It is unrelated to the 'rest' backend.
from rest-server.
S3 uses a flat namespace, it has no concept of folders. Files in a "folder" are just files with a corresponding prefix. It is possible to simulate folders with empty placeholder files. But restic doesn't create those files. Thus, copying a repository from S3 won't include these folders.
restic ignores empty folders (see https://github.com/restic/restic/blob/bfc9c6c9712054366ae6cf1dd66839bb17359e44/internal/backend/local/local.go#L258 ), thus there's no reason why the rest-server shouldn't do the same.
Thank you for your explanation. I've used an older version of Minio S3 as my restic backend that was able to use a "local"/"file system" backend and wrote all files and folders directly to disk (plus additional metadata of course).
@maxkratz the issue in restic is specific for the 'local' backend. It is unrelated to the 'rest' backend.
You are right. Does this mean I should open another issue in the restic
repository regarding the rest
backend to state the 404 error if the locks
folder is missing? If I understand the discussion in the linked issue correctly, this bug was alreday fixed for the local
backend.
from rest-server.
Related Issues (20)
- Backup repository check fails when server is running on OS X HOT 2
- What is the purpose of the for-loop in `TestValidate` of `htpasswd_test.go`? HOT 1
- Add unit tests for listBlobsV2
- Building from source reports wrong version number HOT 3
- WARNING: fsync is not supported by the data storage HOT 7
- Support X-Forwarded-For in logging when behind a proxy HOT 1
- Base URL flag HOT 2
- rest-server doesn't correctly implement REST API HOT 2
- Prepend log with date/time
- Backup fails with 'file content does not match hash' HOT 4
- FR: add Host-level access control HOT 6
- Secure default or configurable TLS settings
- Ensure that written data is correctly written HOT 2
- Additional metric: last snapshot date/timestamp(per repository) HOT 4
- Build & publish docker images HOT 5
- rest-server.socket example file contains 8080 instead of default port 8000
- customize log format
- Cannot change the listen port on docker container HOT 4
- Segfault on 0.11.0 and 0.12.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rest-server.