Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[update] Backup and restore #2038

Merged
merged 4 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions _troubleshooting/timescaledb/pg_restore-errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Errors occur after restoring from file dump
section: troubleshooting
topics: [backups]
errors:
- language: bash
message: |-
org.postgresql.util.PSQLException: ERROR: invalid INSERT on the root table of hypertable "_hyper_1_10_chunk.
keywords: [backups, restore]
---

<!---
* Use this format for writing troubleshooting sections:
- Cause: What causes the problem?
- Consequence: What does the user see when they hit this problem?
- Fix/Workaround: What can the user do to fix or work around the problem? Provide a "Resolving" Procedure if required.
- Result: When the user applies the fix, what is the result when the same action is applied?
* Copy this comment at the top of every troubleshooting page
-->
You might see the errors above when running `pg_restore`. When loading from a
logical dump make sure that you set `timescaledb.restoring` to true before loading
the dump.
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,18 @@ partitions, or the chunk interval sizes.

</procedure>

On a self hosted TimescaleDB instance with `postgres` superuser access you can
take a complete dump of all PostgreSQL databases in a cluster including global
objects that are common to all databases, namely database roles, tablespaces,
and privilege grants using `pg_dumpall`. For more
information about how to use the `pg_dumpall` utility, see
[PostgreSQL documentation][postgres-docs].

[parallel importer]: https://github.com/timescale/timescaledb-parallel-copy
[pg_dump]: https://www.postgresql.org/docs/current/static/app-pgdump.html
[pg_restore]: https://www.postgresql.org/docs/current/static/app-pgrestore.html
[timescaledb_pre_restore]: /api/:currentVersion:/administration/timescaledb_pre_restore/
[timescaledb_post_restore]: /api/:currentVersion:/administration/timescaledb_post_restore/
[timescaledb-upgrade]: /timescaledb/:currentVersion:/how-to-guides/upgrades/
[troubleshooting]: /timescaledb/:currentVersion:/how-to-guides/backup-and-restore/troubleshooting/
[postgres-docs]: https://www.postgresql.org/docs/current/app-pg-dumpall.html