From: | "David Olbersen" <DOlbersen(at)stbernard(dot)com> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: pg_restore problem!!! |
Date: | 2003-07-22 21:15:27 |
Message-ID: | E7E213858379814A9AE48CA6754F5ECB0D7006@mail01.stbernard.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Nick,
> pg_dump dbname | gzip > dbdumpfile.gz
>
> gunzip -c dbdumpfile | psql dbname
If you're compressing why not use:
pg_dump -Fc dbname -f dbdumpfile
pg_restore dbdumpfile
?
Don't take this the wrong way, I'm genuinely curious! When I first started I didn't realize we did our dumps this way and tried to gzip one of the dump files: and got 0% savings!
If this is a way to reduce the size of my nightly dumps I'm all for it! :)
--------------------------
David Olbersen
iGuard Engineer
St. Bernard Software
11415 West Bernardo Court
San Diego, CA 92127
1-858-676-2277 x2152
> -----Original Message-----
> From: Nick Fankhauser [mailto:nickf(at)ontko(dot)com]
> Sent: Tuesday, July 22, 2003 2:05 PM
> To: David Olbersen; pgsql-admin(at)postgresql(dot)org
> Subject: RE: [ADMIN] pg_restore problem!!!
>
>
>
> > To nit-pick, this is a "useless use of cat".
> >
> > In UNIX-land, simple input redirection will work much better:
> >
> > psql [dbname and various options] < [filename]
>
> Good point... to elaborate further, the reason I was in a
> piping mindset is
> that with a large database, it also makes sense to compress
> on the fly to
> avoid filesystem size limits, so I usually use this pair of
> commands for
> backup/restore:
>
> pg_dump dbname | gzip > dbdumpfile.gz
>
> gunzip -c dbdumpfile | psql dbname
>
> -Nick
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Barwick | 2003-07-22 21:18:58 | Re: How can I set a default schema for a session |
Previous Message | Marvin | 2003-07-22 21:08:31 | Re: pg_restore problem!!! |