-
Notifications
You must be signed in to change notification settings - Fork 444
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
Guidance on restoring mariabackup #390
Comments
You're right. Its a little lacking in documentation: How does this look as some steps: The backup:
The restore:
So |
So mariadbbackup is already in the image. The mariadb container entrypoint without a cmd |
Looks great. Good point about the entrypoint cmd. |
So what happens if you restore the database from a backup, is the version of the DB also reverted? Im trying find a simple way to do this in Portainer. I have 3 MariaDBs and i want to upgrade them to the latest version without breaking my wordpress sites. Thanks in advance, so lost here... |
The restore of the data, is only the data, and is restored how it was backed up. You can run a later MariaDB version on the data by changing the container image on the startup. You should run I haven't had the pleasure of using Portainer yet. I wish you a successful and simple upgrade. |
@grooverdan will test this weekend and report back ;-) |
@Silversurfer79 how did it go? |
Not great, I may have missed something clearly. I guess I need to look at this a little more. The WordPress frontend would not connect no matter what I tried to the MDB, as I did the DB update via command line. So, I built a brand-new WP and MDB setup - all connect, basic with no config, takes about 5min. As I use a WP plugin called UpdraftPlus Backup/Restore, simply logged in with new admin account and installed the about plugin and did a full restore (DB, Plugins, Themes, Uploads and Other) and I was backup and ruining in 2-3 minutes. I’m sure there is a better way to do it, because I’m still not 100% on the dependency between WP and MDB and the version... When I update things like Sonarr or Radarr, I simple selected Recreate and Pull the latest image, 2 seconds later its running. Now that said, containers only have Environment Variables (which are static) in Portainer which are reused and have no other decencies, but with WP and MDB they are dependent on each other. I’m not sure if I’m using the correct terminology here, but I hope this makes sense ;-) |
gosu mysql -> --user mysql suggestion thanks @yosifkit Closes: #MariaDB/mariadb-docker/issues/390
* mariadb: using --port As mentioned in #2708 docs documenting how to change the port, particular for host networking was requested. The example in "configuration without a cnf file section" was already the default anyway (utf8), so this was just replaced. Using MARIADB_ROOT_PASSWORD in the example to move away from MySQL naming (still supported however). Closes: #2078 * mariadb: added support for .sql.zst in /docker-entrypoint-initdb.d This was added a while ago in MariaDB/mariadb-docker#376 * mariadb: add Mariabackup (and restore) mechanism gosu mysql -> --user mysql suggestion thanks @yosifkit Closes: #MariaDB/mariadb-docker/issues/390 * mariadb: add password reset documentation Closes: #MariaDB/mariadb-docker/issues/365 * mariadb: installing plugins * Update mariadb/content.md Co-authored-by: yosifkit <[email protected]> * Update mariadb/content.md Formatting on INSTALL SONAME Co-authored-by: Tianon Gravi <[email protected]> * Update mariadb/content.md Compressed backup simplier Co-authored-by: Tianon Gravi <[email protected]> * Update mariadb/content.md better use of apt-get arguments Co-authored-by: Tianon Gravi <[email protected]> Co-authored-by: yosifkit <[email protected]> Co-authored-by: Tianon Gravi <[email protected]>
@Silversurfer79 , I'm sorry I'm not familiar enough with WordPress's dependency on MariaDB and if this is coded on installation. I'm also not familiar with the wordpress plugins mentioned. The nature of the dependency needs to be described more, but probably in a Wordpress forum. I'm happy to watch the discussion there after you link it here, and fill gaps if I see them. For Mariabackup: An updated version of this is now public https://hub.docker.com/_/mariadb Please raise a new issue if anything needs correcting. Or if its just a documentation issue where you know the fix, you can edit https://github.com/docker-library/docs/blob/master/mariadb/content.md directly. |
Assuming a common setup with
/var/lib/mysql
in a separate volume, some guidance would be helpful on how to restore a backup mademariabackup
. The fist step is to stop MariaDB but that kills the container as well. Ideally, the restore would be done using the same Docker image (but not necessarily the same container) as the one running the MariaDB since I has the exact MariaDB version corresponding to the backup. The guidance should not assume thatmariabackup
is available on the host.The text was updated successfully, but these errors were encountered: