Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moonraker DB Backup? #34

Open
5teveO opened this issue Sep 29, 2024 · 1 comment
Open

Moonraker DB Backup? #34

5teveO opened this issue Sep 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@5teveO
Copy link

5teveO commented Sep 29, 2024

Just wondering if the moonraker DB can be backed up as standard folder add or if moonraker needs to be stopped to do it?

Thanks again for v2 - i have just installed it to a new machine and it seems to have worked well.

Just a small comment - is it possible to exclude linked files (im not good with terminology)- eg the fluidd.cfg or mainsail.cfg - same with the KAMP folder..

@Low-Frequency
Copy link
Owner

Since Moonraker uses sqlite, a backup would be really simple. No need to dump the database, it's just copying the file from directory A to directory B, so it's pretty simple to implement.

Regarding KAMP I have no idea how this works or is set up since my printer is still collecting dust and the only testing environment I have is a VM that is pretending to run klipper 😆 If you can hint me towards the setup I can evaluate the complexity and consider adding (or excluding?) it.

Regarding symlinks I went the easy route by just copying the directory recursively, so it just catches everything in that directory, including symlinks. The easy way of ignoring symlinks would be to use rsync instead of cp, but this would mean I'd have to install another dependency, which I try to avoid for the most part. So to exclude those files I'd have to iterate over all files in a directory to evaluate each file before copying it. This isn't too complex, but would add some processing overhead to the backup procedure.

I started working on a v3 with multi-host support that eliminates the necessity for multiple repos, so you can store backups from multiple printers in just one repo, but development of that has slowed down significantly due to stress at work and my personal projects getting out of hand again. I'll add your suggestions to my notes and see what I can do.

@Low-Frequency Low-Frequency added the enhancement New feature or request label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants