Re: Reliably backing up a live database
От | Ken Benson |
---|---|
Тема | Re: Reliably backing up a live database |
Дата | |
Msg-id | 52C2DFC3.3020604@infowerks.com обсуждение исходный текст |
Ответ на | Re: Reliably backing up a live database (Tanstaafl <tanstaafl@libertytrek.org>) |
Ответы |
Re: Reliably backing up a live database
|
Список | pgsql-novice |
On 12/31/2013 5:40 AM, Tanstaafl wrote: > On 2013-04-15 5:36 PM, Tanstaafl <tanstaafl@libertytrek.org> wrote: >> I've been using the command: >> >> pg_dumpall --username=username -o -f mydb_backup.sql.gz > > Ok, please correct me... > > I had thought the above command would result in a gzipped database > dump, due to the .gz extension. > > Obviously, this was a dumb assumption. > > I just tried to extract it, and got an error, but renaming the file to > remove the .gz at the end (so it is just .sql) gives me a text file > that loads just fine and I can see all the DB data, so obviously the > file is not .gz compressed. > > Reading man pg_dump lead me to believe that I needed to add the -Fc > flag to the above command - but, I don't see anything about what type > of compression it uses... will it be .gz? How do I specify (ie, .gz, .gz2 > > But... > > Trying the above failed with an invalid option, an a quick man > pg_dumpall reveals that there is no -F option... > > So, is it possible to get a gzipped (or otherwise compressed) dump > using pg_dumpall? > > I believe you have to use pg_dumpall --username=username -o | gzip > mydb_backup.sql.gz
В списке pgsql-novice по дате отправления: