GithubHelp home page GithubHelp logo

Comments (7)

maxkratz avatar maxkratz commented on August 16, 2024

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.

rawtaz avatar rawtaz commented on August 16, 2024

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.

maxkratz avatar maxkratz commented on August 16, 2024

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.

maxkratz avatar maxkratz commented on August 16, 2024

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.

maxkratz avatar maxkratz commented on August 16, 2024

Update: I found a similar issue and posted a comment.

from rest-server.

MichaelEischer avatar MichaelEischer commented on August 16, 2024

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.

maxkratz avatar maxkratz commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.