Comments (5)
The current method the backup/restore plugin uses to restore is this:
- move octoprint's basedir -> basedir.bak
- unpack the backup to basedir
- 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.
/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.
https://gist.github.com/ax42/58d0c4c41eeabd91600a64e6d3280578 is the log file of the restore failing.
from octoprint-docker.
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.
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 toPYTHONUSERBASE
, instead of the way we have it right now wherePYTHONUSERBASE
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 thePYTHONUSERBASE
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)
- marlin-binary-protocol missing
- Config_Directory not properly initiated HOT 3
- Q: what is the preffered method of updating the octoprint-docker container? HOT 1
- [BUG] octoprint/octoprint:latest or :1.8.6 not up to date HOT 4
- Q: octoprint-docker on Windows HOT 2
- Multiple Webcam Support
- [BUG] Multi camera support uses wrong port HOT 1
- Can't get webcam working
- Multiple processes of mjpg streamer started HOT 7
- [BUG] Webassets are not loaded when X-Script-Name is set HOT 3
- [BUG] Loading error: Passive login failed. raspi 4 HOT 8
- Docker container with camera-streamer HOT 3
- Shutdown/Reboot commands HOT 3
- [BUG] `undefined` tag is present on Dockerhub HOT 1
- AttributeError: 'Babel' object has no attribute 'app' HOT 5
- [BUG] validating /<path>/docker-compose.yml: (root) Additional property payload is not allowed HOT 2
- upgrade to bookworm release python HOT 3
- [BUG] and proposed fix for "PermissionError: [Errno 1] Operation not permitted" due to libseccomp2 HOT 1
- [BUG] mjpg_steamer fails and needs to be restarted
- Q: How do I use with CasaOS HOT 1
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 octoprint-docker.