pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Database Refresh confusion 2+ messages / 2 participants [nested] [flat]
* Database Refresh confusion @ 2018-07-13 11:10 Rijo Roy <rjo_roy@yahoo.com> 2018-07-13 12:04 ` Re: Database Refresh confusion Andreas Kretschmer <andreas@a-kretschmer.de> 0 siblings, 1 reply; 2+ messages in thread From: Rijo Roy @ 2018-07-13 11:10 UTC (permalink / raw) To: pgsql-general Hello Experts, Today, my colleague asked me if there was any way to check the progress of recovery (backup-recovery) in Postgresql. I told him to check the postgresql logs and look out for keywords such as recovery. He was refreshing the database by restoring a database backup but the method he tried surprised me. The below commands were used:pg_basebackup -h remoteservername -p Port number -D /path -X s -c fast -n -P -vAnd he just started the postgresql cluster using pg_ctl I told him that he missed creating a recovery.conf with a recovery command, but he told me that he always does this way. I told him that the process is wrong and this will do a crash recovery and there are high chances of data corruption. He replied saying he never faced an issue following his process of doing it without recovery.conf 2 questions:1. Is this a good practice for refreshing data into a new server. 2. Is there any other mechanism to track the restoration process other than to check the postgresql logs. The postgresql version used in 10.0 on a Linux 6.9 Thanks, Rijo Roy Sent from Yahoo Mail on Android ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Database Refresh confusion 2018-07-13 11:10 Database Refresh confusion Rijo Roy <rjo_roy@yahoo.com> @ 2018-07-13 12:04 ` Andreas Kretschmer <andreas@a-kretschmer.de> 0 siblings, 0 replies; 2+ messages in thread From: Andreas Kretschmer @ 2018-07-13 12:04 UTC (permalink / raw) To: pgsql-general@lists.postgresql.org Am 13.07.2018 um 13:10 schrieb Rijo Roy: > Hello Experts, > > Today, my colleague asked me if there was any way to check the > progress of recovery (backup-recovery) in Postgresql. I told him to > check the postgresql logs and look out for keywords such as recovery. > He was refreshing the database by restoring a database backup but the > method he tried surprised me. > The below commands were used: > pg_basebackup -h remoteservername -p Port number -D /path -X s -c fast > -n -P -v > And he just started the postgresql cluster using pg_ctl > > I told him that he missed creating a recovery.conf with a recovery > command, that's not necessary, without recovery.conf postgres will start as a normal server. > but he told me that he always does this way. I told him that the > process is wrong and this will do a crash recovery and there are high > chances of data corruption. No, this way is safe > He replied saying he never faced an issue following his process of > doing it without recovery.conf > > 2 questions: > 1. Is this a good practice for refreshing data into a new server. > 2. Is there any other mechanism to track the restoration process other > than to check the postgresql logs. pg_basebackup has a progress-feature, -P, see you command above > > The postgresql version used in 10.0 on a Linux 6.9 the latest version is 10.4 and contains a lot of bugfixes, consider a update soon. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-07-13 12:04 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-07-13 11:10 Database Refresh confusion Rijo Roy <rjo_roy@yahoo.com> 2018-07-13 12:04 ` Andreas Kretschmer <andreas@a-kretschmer.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox