1
votes

everybody

I use pg_start_backup and pg_stop_backup to backup Postgresql Database.sometime backup log say tar: Error exit delayed from previous errors; Then I find backup log said tar: /data/pgsql/5432/base/21796/25283: file changed as we read it; How can I avoid this log ??

I test the backup is ok for recovery ?

operational process is

1、 select pg_start_backup('labe');

2、 tar czvf data.tar.gz /data/pgsql/5432 --exclude /data/pgsql/5432/pg_xlog

3、 select pg_stop_backup();

second question is someone use pg_basebackup to backup postgresql ? I test is the same as pg_start_backup and pg_stop_backup?

very thanks

2

2 Answers

1
votes

file changed as we read it is just a warning and the backup is OK, provided pg_start_backup has been called. To silence the warning, if using GNU tar, you may add the option:

--warning=no-file-changed

See http://www.gnu.org/software/tar/manual/html_section/warnings.html

pg_basebackup is another way of taking a hot backup. It differs mostly by not needing file access on the db server (it uses a PostgreSQL connection to get the data), and providing some specific options related to WAL files.

1
votes

does someone use pg_basebackup to backup your postgresql database ??

and pg_baebackup take a full backup ervery day and use archive data to recovery to point to time recovery