Upgrade Supermarket
Upgrade Matrix
Running Version | Upgrade Version | Supported Version |
---|---|---|
A1 | B1 | C1 |
A2 | B2 | C2 |
A3 | B3 | C3 |
Upgrade Supermarket
Database Preparation
Upgrade Steps
External PostgreSQL
The External PostgreSQL upgrade steps are provided as a courtesy. It is the responsibility of the user to upgrade and maintain any External PostgreSQL configurations.
Follow these steps to upgrade the PostgreSQL major version.
Upgrade Supermarket
Do we need to upgrade Supermarket first?
Backup PostgreSQL Database
- Stop the Supermarket application
sudo supermarket-ctl stop
- Start the Supermarket PostgreSQL service
sudo supermarket-ctl start postgresql
- Back up the PostgreSQL database
/opt/supermarket/embedded/bin/pg_dumpall -U supermarket -p 15432 > /tmp/supermarket-dump.sql
- Vacuum the PostgreSQL database:
/opt/supermarket/embedded/bin/vacuumdb --all --full -p 15432
- Reindex the PostgreSQL database:
/opt/supermarket/embedded/bin/reindexdb --all -p 15432
- Restart the Supermarket application
supermarket-ctl restart
Recovering from Upgrade Failures
If either the vacuumdb
or reindexdb
commands fail
- Drop the Supermarket PostgreSQL database
/opt/supermarket/embedded/bin/psql -U supermarket -d postgres -p 15432 -c "drop database supermarket"
- Recreate the Supermarket PostgreSQL database
/opt/supermarket/embedded/bin/psql -U supermarket -d postgres -p 15432 -c "create database supermarket"
- Restore Supermarket PostgreSQL database from the existing
dump.sql
file
/opt/supermarket/embedded/bin/psql -U supermarket -d supermarket -p 15432 -f /tmp/supermarket-dump.sql
- Restart the Supermarket application
supermarket-ctl restart
Was this page helpful?