[GENERAL] Using cp to back up a database? - Mailing list pgsql-general

From Ron Johnson
Subject [GENERAL] Using cp to back up a database?
Date
Msg-id 356ee3ba-e1b6-d0e5-0ae6-1e66a6df3252@cox.net
Whole thread Raw
Responses Re: [GENERAL] Using cp to back up a database?  (Larry Rosenman <ler@lerctr.org>)
Re: [GENERAL] Using cp to back up a database?  (Jeff Janes <jeff.janes@gmail.com>)
Re: [GENERAL] Using cp to back up a database?  (Darren Douglas <darren@synsesolutions.com>)
List pgsql-general
Hi,

v8.4.20

This is what the current backup script uses:

/usr/bin/psql -U postgres -c "SELECT pg_start_backup('Incrementalbackup',true);"
cp -r /var/lib/pgsql/data/* $dumpdir/data/
/usr/bin/psql -U postgres template1 -c "SELECT pg_stop_backup();"


Should it use rsync or pg_dump instead?

Thanks

-- 
World Peace Through Nuclear Pacification

pgsql-general by date:

Previous
From: Durumdara
Date:
Subject: [GENERAL] Error: "cached plan must not change result type"
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Equivalence Classes when using IN