Open jaisor opened 4 years ago
Hi @jaisor, thanks for the contribution.
I couldn't actually reproduce the backup basedir problem though. I tested with your patch and saw no difference other than the backup zip being saved in the /data/data
folder.
Can you provide an example of what the issue is?
Hi @nunofgs, its been a while, but if I recall right - it was a permissions issue. See the backup plugin I likned in the comment above? It tries to move (rename) the basedir to a backup location
shutil.move(basedir, basedir_backup)
This was an issue for me because /data
was linked to /root/.octoprint
which is owner by root. The backup plugin is running by a different user so it does not have permissions to rename the root owned location.
Moving everything one level deeper (/data/data
) solved the issue as all operations were done on folders owned and created by the user running OctoPi
The backup plugin wants to move the base dir to a backup location as a final step: https://github.com/foosel/OctoPrint/blob/master/src/octoprint/plugins/backup/__init__.py#L858
This fails with default basedir
/root/.octoprint
linked to/data
.Moved the basedir inside the
/data
volume which seems to fix the issue.Added healtcheck to debian but have not tested it very well.