Re: Incremental backup with RSYNC or something? - Mailing list pgsql-general

From Robins Tharakan
Subject Re: Incremental backup with RSYNC or something?
Date
Msg-id 4EBFC7E9.90505@comodo.com
Whole thread Raw
In response to Re: Incremental backup with RSYNC or something?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Responses Re: Incremental backup with RSYNC or something?  (Robins Tharakan <robins.tharakan@comodo.com>)
List pgsql-general
> What "other methods" do you recommend? That was in fact my question.
> Do I need to install some modules?

Well depending on your PG version you could read up about the various
backup methods. I believe you'll be interested in 24.3 there when you
ask for WAL archiving. The good thing is, its useful for DBs much bigger
and especially for those that 'cant' go down for even a minute, but yes
it has its trade-offs. (Its not that bad actually, but its a call you
need to take).

http://www.postgresql.org/docs/8.4/static/backup.html

 > I'm gzipping with this command (this is my backup.sh)--
 >
 >
 >      BKPFILE=/backup/pg/dbback-${DATA}.sql
 >      pg_dump MYDB -U MYDB_MYDB -f ${BKPFILE}
 >      gzip --fast ${BKPFILE}

You could club the pgdump / gzip in one step, thereby avoiding extra
writes to disk. The URL below should help you on that (pgdump dbname |
gzip > file.gz)

http://www.postgresql.org/docs/8.4/static/backup-dump.html#BACKUP-DUMP-LARGE

You could also do a

pg_dump -Fc | gzip -1 -c > dumpfile.gz

at the cost of a slightly larger (but faster backup).

--
Robins Tharakan

pgsql-general by date:

Previous
From: Gregg Jaskiewicz
Date:
Subject: Re: FK dissapearing
Next
From: Robins Tharakan
Date:
Subject: Re: Incremental backup with RSYNC or something?