Re: pg_restore: warning: invalid creation date in header

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_restore: warning: invalid creation date in header
Date: 2021-06-13 16:12:25
Message-ID: 52961.1623600745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> Tom, it's a directory format dump, what file would make the most sense to
> run oc on? Or does this not work w/a directory?

The toc.dat file. You should see something like

$ od -c mydump/toc.dat | head
0000000 P G D M P 001 016 \0 004 \b 003 001 001 \0 \0 \0
0000020 \0 027 \0 \0 \0 \0 \n \0 \0 \0 \0 \f \0 \0 \0 \0
0000040 \r \0 \0 \0 \0 005 \0 \0 \0 \0 y \0 \0 \0 \0 001
0000060 \0 \0 \0 \0 \n \0 \0 \0 r e g r e s s i
0000100 o n \0 \a \0 \0 \0 1 4 b e t a 1 \0 \a
0000120 \0 \0 \0 1 4 b e t a 1 \0 315 \b \0 \0 \0
0000140 u 037 \0 \0 \0 \0 \0 \0 \0 \0 001 \0 \0 \0 0 \0
0000160 001 \0 \0 \0 0 \0 \b \0 \0 \0 E N C O D I
0000200 N G \0 \b \0 \0 \0 E N C O D I N G \0
0000220 002 \0 \0 \0 \0 # \0 \0 \0 S E T c l i

If there's not a "PGDMP" signature at the start then it's the wrong
file.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2021-06-13 16:16:00 Re: pg_restore: warning: invalid creation date in header
Previous Message Wells Oliver 2021-06-13 16:03:04 Re: pg_restore & locks