Skip to content

Instantly share code, notes, and snippets.

@WooodHead
Forked from ohld/update_metabase_docker.sh
Created February 19, 2022 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WooodHead/c5a25dac2e877a6bf552c09676255ff8 to your computer and use it in GitHub Desktop.
Save WooodHead/c5a25dac2e877a6bf552c09676255ff8 to your computer and use it in GitHub Desktop.
How to safely update Metabase if you use docker deployments WITHOUT ANY DATA LOSS
# check the name of metabase container
docker ps
# make a backup
docker cp metabase:/metabase.db /root/
# get updated version
docker pull metabase/metabase
# remove old running container
docker stop metabase
docker rm metabase
# run new Metabase with backuped data
docker run -d -p 3000:3000 --name metabase -v /root/metabase.db:/metabase.db -e "MB_DB_FILE=/metabase.db" metabase/metabase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment