Hi! im a bit confused because i have a MariaDB instance on my mini-pc so i can control things like NextCloud but some people told me i should not update my docker image of MariaDB because it can break? and other people said update it… Im unsure what to do… Some advices?

  • rezzorix@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You could:

    Backup your database. Run a second docker container with new version database. Restore/import backed up database from old version into the new version.

    And then try out if all works without errors.

    If errors, you can just revert back to your initial docker container with the old version.

      • adamshand@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        If you are using bind mounts with your container, there is a really easy way to backup before an update.

        • stop the database container
        • cp -a bind_mount_dir/ bind_mount_dir.20231019

        Then pull the latest database image and restart database container. If it works, yay, you’re done.

        If it doesn’t work, reverse the steps:

        • stop the container
        • mv bind_mount_dir/ bind_mount_dir.broken
        • mv bind_mount_dir.20231019 bind_mount_dir

        Restart container and you’re back to exactly where you were before the upgrade.