Skip site navigation (1) Skip section navigation (2)

Re: Out of space making backup

From: Brian Modra <epailty(at)googlemail(dot)com>
To: Farhan Malik <malikpiano(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Out of space making backup
Date: 2009-12-25 16:44:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
2009/12/25 Farhan Malik <malikpiano(at)gmail(dot)com>:
>> Reading between the lines, I suspect you are trying to use 'tar' output
>> format, which does have a need to make temp files that can be large.
>> If I guessed right, I'd suggest using 'custom' format instead.  There
>> really is no advantage to tar format, and several disadvantages besides
>> this one.
>>                        regards, tom lane
> That sounds right.  The error I get from the software is 2009/12/25
> 10:21:40.812: [00001EA8][ThreadBackupRestore] Restore Error: pg_dump:
> [tar archiver] could not write to output file: No space left on device
> Is there a way to have postgre put those large temp files on a
> different drive?  I only have 4GB free on my C: drive and once the
> temp files go over that I get an out of space error.  I have tons of
> free space on other drives, including the one where I am asking that
> the final file goes.
> As for changing the backup to a custom format, I will pass that on to
> the developer of the software.

I do backups semi-manually:

use select pg_start_backup('some-name') (in psql logged in a postres)
then start a tar of /var/lib/pgsql/data/, to stdout and pipe this to
tar on another server using ssh
then finally select pg_stop_backup()

e.g. my two scripts ( calls

[root(at)www pgsql]# cat
cd /var/lib/pgsql
ssh lead touch /var/lib/postgresql/backups/start_backup
tar zcf - data |ssh lead "cat > /var/lib/postgresql/backups/20091223.tgz"
echo "DONE"
[root(at)www pgsql]# cat
cd /var/lib/pgsql
./ > backups/backup.log 2>&1 </dev/null &
[root(at)www pgsql]#

> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:

Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa

In response to


pgsql-general by date

Next:From: Rob JaegerDate: 2009-12-25 17:02:30
Subject: Finding the bin path
Previous:From: Farhan MalikDate: 2009-12-25 16:35:01
Subject: Re: Out of space making backup

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group