Skip to content
Snippets Groups Projects
Closed pgsql handler does not report failed database dumps
  • View options
  • pgsql handler does not report failed database dumps

  • View options
  • Closed Issue created by alster
    Debug: su - postgres -c "/usr/bin/pg_dumpall | /bin/gzip > /var/backups/postgres/myserver-all.sql.gz"
    Debug: pg_dump: [archiver (db)] connection to database "mydatabase" failed: FATAL: database "mydatabase" does not exist pg_dumpall: pg_dump failed on database "mydatabase", exiting
    Info: Successfully finished dump of pgsql cluster
    Info: <<<< finished action /etc/backup.d/20.pgsql: SUCCESS
    

    If I had not been running this pgsql backup handler in debug mode, I had not become aware of one of the databases not being dumped. It would be better if the whole process would exit with a non-zero status code if pd_dump failed to create just one of the dumps. Otherwise, you may end up with one database missing from your backups without the sysadmin ever becoming aware of it until she needs them.

    I admit that this situation is somewhat constructed, though. I dropped the "mydatabase" by the time backupninja was creating the dumps. Nevertheless, there could be other resons for the database missing, or similar errors could occur and not get reported.

    This is about backupninja 0.9.6-4 on Debian/GNU Linux 5.0.3 and postgresql 8.3.8-0lenny1.

    (from redmine: created on 2009-10-18, closed on 2010-01-08)

    Linked items 0

  • Link items together to show that they're related.

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first