Giter Site home page Giter Site logo

Comments (5)

buckybytes avatar buckybytes commented on June 1, 2024 1

You should be able to backup and restore your database using mysqldump

from bookstack.

ssddanbrown avatar ssddanbrown commented on June 1, 2024 1

@need4swede Currently you data will be within the running container. Take care as that data will likely be destroyed if the container is destroyed (Which can occur even if you just take the compose stack down).

As mentioned by @buckybytes, you'd ideally perform a mysqldump of the existing data for safe-keeping, and re-import.
Alternatively, as long as you still use the same exact docker image, you could copy out the /var/lib/mysql files from inside the container. Ideally use a mysqldump though.

I've got a video here on taking a mysqldump via a docker compose stack.
See the "Creating Backups" and "Restoring a from a backup" sections.
It's using the linuxserver mariadb image, but the steps should be pretty similar.

from bookstack.

need4swede avatar need4swede commented on June 1, 2024 1

@ssddanbrown

Bless you, Dan. Worked like a charm!
Now excuse me while I document the backup process in my BookStackApp.

Cheers!

from bookstack.

ssddanbrown avatar ssddanbrown commented on June 1, 2024

Hi @need4swede,
You are mounting the /config path for the database, which is commonly a linxuserver image thing, but not commonly used for other container images like the one you're using which is not a linuxserver-managed image.

Your compose stack indicates you're using this image.
Based upon the guidance there, I think you need to mount to the /var/lib/mysql container path instead for that image.

from bookstack.

need4swede avatar need4swede commented on June 1, 2024

Your compose stack indicates you're using this image. Based upon the guidance there, I think you need to mount to the /var/lib/mysql container path instead for that image.

Thank you for the reply! This seems to work and I can see my database folder now being used. Pardon my ignorance, but is there a way for me to transfer my existing database from the Docker volume to my host - or will I lose all my existing data and have to start fresh?

from bookstack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.