Search Postgresql Archives

Re: Using cp to back up a database?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/10/2017 16:51, Larry Rosenman wrote:

If you want a consistent database (you *REALLY* do), pg_dump is the correct tool.


In all pg conferences I have been, ppl scream : do not use pg_dump for backups :)

 

-- 

Larry Rosenman                     http://www.lerctr.org/~ler

Phone: +1 214-642-9640                 E-Mail: ler@xxxxxxxxxx

US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106

 

 

From: <pgsql-general-owner@xxxxxxxxxxxxxx> on behalf of Ron Johnson <ron.l.johnson@xxxxxxx>
Date: Monday, October 9, 2017 at 8:41 AM
To: "pgsql-general@xxxxxxxxxxxxxx" <pgsql-general@xxxxxxxxxxxxxx>
Subject: Using cp to back up a database?

 

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


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux