Skip to content

Upgrade Guide

fleischsalatinspace edited this page Aug 25, 2024 · 4 revisions

General Upgrade Instructions:

1. Backup your database.

docker-compose down
docker-compose up -d pfdb
docker-compose exec pfdb sh -c "exec mysqldump pf -uroot -p\${MYSQL_ROOT_PASSWORD}" | gzip > /tmp/pathfinder_database_$(date +%F_%H-%M-%S).sql.gz

This dumps your current pathfinder database to the /tmp/ folder. You'll probably want to move this somewhere more permanent, or update the path in the command before running it.

If you ever need to restore the dump use something like

docker-compose down
docker-compose up -d pfdb
gunzip < "/tmp/<<YOURFILENAME>>.sql.gz" | docker compose exec -T "pfdb" sh -c "exec mysql pf -uroot -p\${MYSQL_ROOT_PASSWORD}"

Adjust your dump file location and filename and be aware that a dump restore removes all current data in the database !

2. Pull the latest version and rebuild your containers:

docker-compose down
git stash
git pull --recurse-submodules
git stash apply
docker-compose up -d 

This will "stash" any local changes you have made, like modifications to pathfinder.ini and your .env file so that they don't get removed or cause merge conflicts when you pull the new version. It then pulls any changes to repositories, reapplies the stashed changes and rebuilds the docker-containers with the changes.

3. Check everything still looks okay on the /setup page

  • Go to the {your-pathfinder-domain}/setup page and check that all the statuses there still look okay.
  • The most important to check are the database tables
  • If a Pathfinder release specifies that it has a database schema change, run the "Fix Columns/keys" task for the affected database(s)