Skip to content

Instantly share code, notes, and snippets.

@xensbakuli
Forked from somerongit/TimescaleDb.md
Created March 27, 2025 07:16
Show Gist options
  • Save xensbakuli/df4032d71152f10eb39cf8e5cb99d6b1 to your computer and use it in GitHub Desktop.
Save xensbakuli/df4032d71152f10eb39cf8e5cb99d6b1 to your computer and use it in GitHub Desktop.
Timescale DB Backup and Restore

Timescale DB

Backup

docker exec -i postgres pg_dump -d postgres://user:password@postgres_service:5432/db | gzip > ./backup.sql.gz

Restore

gunzip backup.sql.gz
docker exec -i postgres psql -d postgres://user:password@postgres_service:5432/db < backup.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment