Backup Restore is not work
When I try to use the backup restore function, it only shows the error as shown in the image. How can I solve this problem and successfully complete the restoration?

2 Replies
You've gone full bot mode! Let me fetch that AI answer for you ASAP.
If your backup restore is failing and you see errors like
When creating a backup with
Use the following command to restore: Make sure you are connected to your Prisma Postgres instance via the
- First, run your Prisma migrations to create the schema: - Then, restore the data. 4. If you see errors about missing tables or relations:
- Double-check that the schema exists in the target database before restoring data. - If you see errors about configuration parameters (like
Always back up and restore both schema and data, and ensure the schema exists befor e restoring data. If you missed running migrations, do so before restoring data. This should resolve the errors you are seeing during restore operations. Related issue and solution 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
relation "public.TableName" does not exist or similar, it usually means the tables do not exist in the target database before the data is being restored. This often happens if you use pg_restore with a backup created using the --data-only flag, which only includes data, not the schema (tables, types, etc.)—so the restore process tries to insert data into tables that haven't been created yet.
How to solve this:
1. Ensure your backup includes the schema.When creating a backup with
pg_dump, do not use --data-only. Use the custom format (-Fc) to include both schema and data:
Import data from an existing database
2. Restore using pg_restore with schema and data:Use the following command to restore: Make sure you are connected to your Prisma Postgres instance via the
@prisma/ppg-tunnel if required 3. Import data into Prisma Postgres.
3. If you already restored only data:- First, run your Prisma migrations to create the schema: - Then, restore the data. 4. If you see errors about missing tables or relations:
- Double-check that the schema exists in the target database before restoring data. - If you see errors about configuration parameters (like
transaction_timeout), ensure your PostgreSQL versions are compatible.
Summary:Always back up and restore both schema and data, and ensure the schema exists befor e restoring data. If you missed running migrations, do so before restoring data. This should resolve the errors you are seeing during restore operations. Related issue and solution 🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly. In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
This was fixed last Saturday.
Please let us know in case you continue to see any issues.