Skip to main content
1 of 2

Try below example, omitting the '-c' flag in pg_dump command:

pg_dump -C database_name | xz > backup-$(date -u +%Y-%m-%d).sql.xz