Upgrades within a Docker container
note
In this section, the examples use a Docker instance called . If you have given your Docker instance a different name, replace it when you issue the commands.
When you start your upgraded Docker container, you need to be able to point the new Docker image to the location that contains the data from your previous version. To do this, you need to work out where the current mount point is. The current mount point varies depending on whether your container is using volume mounts, or bind mounts.
Work out what type of mount your Docker container uses by running this command, which returns either
volume
orbind
:
Upgrade TimescaleDB within Docker
To upgrade TimescaleDB within Docker, you need to download the upgraded image, stop the old container, and launch the new container pointing to your existing data.
Upgrading TimescaleDB within Docker
Pull the latest TimescaleDB image. This command pulls the image for PostgreSQL 14. If you’re using another PostgreSQL version, look for the relevant tag in the .
Stop the old container, and remove it:
Connect to the upgraded instance using
psql
with the-X
flag:At the psql prompt, use the
ALTER
command to upgrade the extension:-
CREATE EXTENSION IF NOT EXISTS timescaledb_toolkit;
ALTER EXTENSION timescaledb_toolkit UPDATE;
note
If you have multiple databases, you need to update each database separately.