GithubHelp home page GithubHelp logo

Comments (5)

LongLiveCHIEF avatar LongLiveCHIEF commented on May 24, 2024 1

The current method the backup/restore plugin uses to restore is this:

  1. move octoprint's basedir -> basedir.bak
  2. unpack the backup to basedir
  3. delete the backup

This means that if any other active process is using the basedir on the host filesystem, then the backup restore will fail since the OS prevents this in order to prevent fatal cascading process failures. If you're using docker to mount a volume to octoprint's basedir, then docker process will have an open fd for the octoprint basedir, and step 1 above will fail.

This isn't just a docker problem. For example... another good example would be if you're using NFS or some other externalized file server mounted onto the host as octoprint's basedir.

Basically, this one comes down to how the backup/restore is implemented, and isn't something that needs to be fixed within the docker image itself. If there is a technique the implementing user wishes to attempt based on mounting to different container volumes than the basedir, then docker allows that for specifically that type of reason, but it's not something you'd change in the docker image because a docker image should be implementation agnostic in order to do what docker does.

from octoprint-docker.

LongLiveCHIEF avatar LongLiveCHIEF commented on May 24, 2024

/cc @ax42 if you do any further testing for this one, drop logs in this thread in case we get other contributors/historical reference. Also feel free to copy over any logs or steps you already shared in discord.

from octoprint-docker.

ax42 avatar ax42 commented on May 24, 2024

https://gist.github.com/ax42/58d0c4c41eeabd91600a64e6d3280578 is the log file of the restore failing.

from octoprint-docker.

GitIssueBot avatar GitIssueBot commented on May 24, 2024

This issue has been mentioned on OctoPrint Community Forum. There might be relevant details there:

https://community.octoprint.org/t/backup-restore-fails-on-device-or-resource-busy/27182/2

from octoprint-docker.

LongLiveCHIEF avatar LongLiveCHIEF commented on May 24, 2024

I've now implemented plugin persistence via #132, I think I've identified a way to officially support backup/restore plugin from within the docker container.

What I'm going to try is this;

  • change the octoprint --basedir in the service start command so that it is a sibling directory to PYTHONUSERBASE, instead of the way we have it right now where PYTHONUSERBASE is a child of the octoprint basedir.

I'm going to test the following approach:

  • have the docker image create an /octoprint/octoprint directory as the --basedir
  • have the image create the /octoprint/plugins directory explicitly, and leave it set as the PYTHONUSERBASE

This approach should mean the we can keep the current usage of mounting the /octoprint as the container volume, which should make existing usage docs compatible so it doesn't impact users, but still enables backup/support by decoupling the basedir as the volume mount directory.

If this works, we'll need to remove the config.yaml pre-setting for the disabled status of this plugin.

from octoprint-docker.

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.