[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: packaging Postgres binary dump files



On Thu, Sep 19, 2013 at 2:49 PM, Martijn van Oosterhout wrote:

> FWIW, you can convert the file to text using pg_restore, you don't actually
> need a running database server. It's really just a compressed tarball and
> should be treated as such. That is, I think it can be included as-is. Unless
> you're thinking of patching it, in which case you need to think of something
> else.

The format doesn't appear to be very efficient, the plain SQL commands
are much smaller:

pabs@wagner:~$ pg_restore -l postbooks_empty-4.1.0.backup > foo.sql
pabs@wagner:~$ ls -Ssh
total 5.6M
5.3M postbooks_empty-4.1.0.backup  344K foo.sql

It doesn't seem possible to treat it as a compressed tarball:

pabs@chianamo ~ $ tar zxf postbooks_empty-4.1.0.backup
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
pabs@chianamo ~ $ tar jxf postbooks_empty-4.1.0.backup
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
pabs@chianamo ~ $ tar Jxf postbooks_empty-4.1.0.backup
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


Reply to: