PrismaP
Prisma9mo ago
18 replies
xhulz

Backup does not work with heavy tables

Hi,

I'm encountering an issue when trying to create a backup.
1. The error occurs with only one table, which has around 1.5 million records (Users)
2. I’ve already tried requesting a backup for just that specific table, but the error still persists
3. The tunnel returns only this message: Connection closed { code: 1006, reason: '' }

Could you please help me with this?

Thank you!

Tunnel: npx @prisma/ppg-tunnel@latest --host 127.0.0.1 --port 5432

Command:
PGSSLMODE=disable \
pg_dump \
-h 127.0.0.1 \
-p 52604 \
-Fc \
-v \
-d postgres \
-f ./mydatabase.bak \
-t "core."Users"" \
&& echo "-complete-"

Response:
pg_dump: dumping contents of table "core.Users"
pg_dump: error: Dumping the contents of table "Users" failed: PQgetCopyData() failed.
pg_dump: detail: Error message from server: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pg_dump: detail: Command was: COPY core."Users" (id, "walletAddress", "referralCode", active, "createdAt", "emailAddress", banned, "bannedAt", "bannedReason", "firstName", "isEmailVerified", "lastName", "userName", "chainId", "tokenId") TO stdout;
Was this page helpful?