Hello,
I am currently running a TimescaleDB database in Docker with PostgreSQL 13 and TimescaleDB 2.14.0. I plan to migrate to PostgreSQL 16 with TimescaleDB 2.14.0 (initially) and would like to know the best strategy for performing an efficient backup and restore.
Context:
- The database is running in Docker containers with mounted volumes for data persistence.
- I am planning to upgrade both PostgreSQL and TimescaleDB versions.
Questions:
- Complete Backup: What would be the best approach for performing a full backup of the database in this scenario? Should I use
pg_dumpall
,pg_dump
or wouldpg_basebackup
be a better approach due to the migration between PostgreSQL versions? - Restore and Version Migration: What are the recommended steps for restoring the data when migrating from PostgreSQL 13 + TimescaleDB 2.14.0 to PostgreSQL 16 + TimescaleDB 2.14.0? Is there anything specific I should consider when dealing with hypertables and compression?
- Preserving TimescaleDB Settings: How can I ensure that all TimescaleDB-specific settings, such as compression and retention policies, are properly restored in the new environment?
- Testing: Are there any recommended procedures to test the database integrity after the restore, especially regarding the functioning of hypertables and chunks?
Thank you in advance for any guidance and suggestions. I’m open to any advice on how to safely and efficiently perform this migration.
Thanks!