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
Backing up correctly before performing updates #145
Comments
I will have to write new documentation regarding backups. Offline backupsThe easiest method to create a backup is to stop all containers, in which case, if the image's implementation and the configuration used to start the container are correct, the directories used as volumes can simply be copied. If the directory structure is Online backupsCreating a backup at runtime (no MariaDB backupsA binary backup of MariaDB is probably less safe than an SQL backup, but faster to create and restore. If you are using Creating an SQL backup and compressing it to gzip on the fly The password prompt can be avoided by either passing the password via command line, by using the implicit Passing the password via command lineThis is less secure than the other options: Passing the password via .my.cnfCreate a
|
I'll be honest with you, I'm actually terrified to STOP the containers. As I said in my op, my 'dumber' dockers, I just stop, pull new, re-start and off we go. With libre, I feel like the API key or something may have impacted it starting again properly. For what it's worth, I'm more than comfortable, with running multiple varieties of backups, storage is cheap and since I don't entirely know what I'm doing, I am happy to take multiple types. Here's what I put together, before I realised you replied:
I would actually prefer your method, take a cold, offline copy of the entire DB directory, so I will try that too shortly, thank you. |
Thanks for your help, it's always appreciated! I then backed up the fully offline data folders. None the less, it's back up and running, with a new version of librenms and I feel a little safer stopping and starting. I'll be honest here, I've been playing with your container on and off for so long, that it might have been back before I know to map content out, with the -v command, not sure. So to be clear, my method was as follows docker stop libre That was about it. I have only 2 questions remaining (sorry) 1, does that method seem correct to you? Thank you! |
There should be no need to run migrations. Was this message already present on the previous instance, or did it only appear after copying? Perhaps there is an issue with MariaDB's volumes. If you are unsure about losing data, there is no need to remove the containers, merely stopping them is sufficient. I assume all volumes are explicit via Unless you have a good reason, just stick to a version that still receives updates: Docker Hub. New versions might introduce security features (algorithms, authentication schemes) that require new versions of the CLI and PHP libraries. The opposite, having a recent client, but a very old server, may also cause problems. |
@jaxjexjox Some docs are available now: https://github.com/jarischaefer/docker-librenms#backups |
Well, hello @jarischaefer I successfully upgraded my basic setup at home several months ago. Sadly, I've attempted to upgrade both librenms and mariadb at my test work install, with no luck unfortunately. Here's what I've got now:
I can upgrade my mariadb within the same chain as you outlined above, this works ok. Unfortunately when I upgrade my librenms that's where the problems begin (regardless of mariadb version, including unchanged) Error from the web:
Then this:
I've googled a few solutions and not getting much traction. |
and after all that and at least 90 minutes messing around, I managed to get it working.
Seems to work better than sudo docker exec -i librenmsOther /bin/bash then manually running the command? Confused as to why this is but none the less I successfully upgraded again. |
@jarischaefer I'm finally closing this off, you've been more than helpful and I should have closed it earlier. One final thing, if you get a chance, can you merge / pull any changes from the official for a new build when you get a chance (I've no idea what criteria you use for new versions?) but I successfully got them to add a new feature very easily, I was quite impressed. Thanks for your hard work! |
Hi @jarischaefer
Apologies, big apologies for this, I've been using docker for years but this is my first 'multi-docker' system with 2 dockers talking to one and other.
How do I absolutely, safely make a full backup of my configuration, so that I can comfortably update it, knowing it can be rescued?
Again, I'm very sorry, I know this is probably elementary stuff but all my docker containers I've "backed up" the -v /data content and that's it, I've never had to backup a database before.
Here's how she was spun up.
I'm happy to follow the upgrade guide but now that I've finally got a copy working I like, it's become useful and I'd hate to lose the work put into it.
Thank you, a lot for your time, really
The text was updated successfully, but these errors were encountered: