Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7440

stash.diy-backup.postgresql.sh function stash_restore_db fails with PostgreSQL 8.4

      Hi,

      I am verifying my diy backups to make sure I can restore but it's not working for me.

      The postscript function stash_backup_db uses format option '-Fd'
      pg_dump ${PG_USER} ${PG_HOST} --port=${POSTGRES_PORT} ${PG_PARALLELL} -Fd ${STASH_DB} ${PG_SNAPSHOT_OPT} -f ${STASH_BACKUP_DB}

      and the pg_restore_db uses the same thing. But when I tried to restore I got a failure:
      pg_restore: unrecognized archive format "d"; please specify "c" or "t"

      Looking at the man pages (I have postgresql 8.4) neither pg_dump or pg_restore have "d" listed as a valid format option. pg_dump lists p,c,t and pg_restore only lists c and t. I tried to restore using '-Ft' and the error became :
      pg_restore: [tar archiver] could not find header for file toc.dat in tar archive

      So I then tried '-Fc' and the error became
      pg_restore: [archiver] unexpected end of file

      So then I tried leaving out the -F argument altogether and the error became
      pg_restore: [archiver] could not read input file: Is a directory

      I checked the latest stash-diy-backup-postgresql code and the functions look unchanged from what I have.

      I am worried that my backups are all invalid. Is there a way to restore one of them?

      Which format should I use going forward?

      Thanks
      Mark

            [BSERV-7440] stash.diy-backup.postgresql.sh function stash_restore_db fails with PostgreSQL 8.4

            Owen made changes -
            Workflow Original: Stash Workflow - Restricted [ 1447838 ] New: JAC Bug Workflow v3 [ 3137297 ]
            Owen made changes -
            Symptom Severity Original: Major [ 14431 ] New: Severity 2 - Major [ 15831 ]
            Christian made changes -
            Resolution New: Won't Fix [ 2 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]
            Cristan Szmajda (Inactive) made changes -
            Assignee Original: Cristan Szmajda [ cszmajda ]
            Cristan Szmajda (Inactive) made changes -
            Summary Original: stash.diy-backup.postgresql.sh function stash_restore_db fails New: stash.diy-backup.postgresql.sh function stash_restore_db fails with PostgreSQL 8.4
            Cristan Szmajda (Inactive) made changes -
            Status Original: In Progress [ 3 ] New: Open [ 1 ]
            Cristan Szmajda (Inactive) made changes -
            Status Original: To be reviewed [ 10026 ] New: In Progress [ 3 ]
            jonah (Inactive) made changes -
            Symptom Severity New: Major [ 14431 ]
            Owen made changes -
            Workflow Original: Stash Workflow [ 873912 ] New: Stash Workflow - Restricted [ 1447838 ]
            Cristan Szmajda (Inactive) made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 111941 ]

              Unassigned Unassigned
              mark.ruedy mark.ruedy
              Affected customers:
              0 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: