backup issue after migration

I migrated my postgres database to V2, I was using this template for backup: https://github.com/railwayapp-templates/postgres-s3-backups when I checked the logs I found that the backup is failing with this error:
Error while running backup: {
stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: hypertable\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: chunk\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: continuous_agg\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'
}
Error while running backup: {
stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: hypertable\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: chunk\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: continuous_agg\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'
}
GitHub
GitHub - railwayapp-templates/postgres-s3-backups: A simple Node ap...
A simple Node app to automatically backup PostgreSQL databases to an S3 bucket - GitHub - railwayapp-templates/postgres-s3-backups: A simple Node app to automatically backup PostgreSQL databases to...
No description
10 Replies
Percy
Percy13mo ago
Project ID: f24f66a8-3ea7-4ec9-b82a-5904487dee94
SEMICOLON;
SEMICOLON;OP13mo ago
f24f66a8-3ea7-4ec9-b82a-5904487dee94
Brody
Brody13mo ago
that's actually just a warning, but it's treated as an error because the code treats all text printed to stderr as an error. I've been thinking about this for the past few days, and I can't come up with a solution that I'm happy with. pg_dump doesn't really give you a good indication that the print to stderr is a warning or a critical error
SEMICOLON;
SEMICOLON;OP13mo ago
The problem is that the backup is not working anymore after I migrated to the new V2 database, not sure what's happening because it was working fine before migration. The same error appeared again today at the time of cron job (backup schedule):
Error while running backup: {

stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +

'pg_dump: detail: hypertable\n' +

'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +

'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +

'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +

'pg_dump: detail: chunk\n' +

'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +

'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +

'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +

'pg_dump: detail: continuous_agg\n' +

'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +

'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'

}
Error while running backup: {

stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +

'pg_dump: detail: hypertable\n' +

'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +

'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +

'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +

'pg_dump: detail: chunk\n' +

'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +

'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +

'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +

'pg_dump: detail: continuous_agg\n' +

'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +

'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'

}
Is there any solution for it? Maybe I should deploy a new backup template instead of the one I use right now?
Brody
Brody13mo ago
yes im aware, and i already have a fix sitting in a local branch, im just not 100% happy with it so i haven't pr'd it. id look into using another template for backups for now
Taka
Taka13mo ago
Hi there, I'm having the same problem. Is there any fix for this?
Brody
Brody13mo ago
look into using another template for backups for now
Taka
Taka13mo ago
Thanks for your reply, do you know any other templates?
Brody
Brody13mo ago
search the marketplace for one that suites your needs https://railway.app/templates
Taka
Taka13mo ago
ok, thanks
Want results from more Discord servers?
Add your server