pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Kretschmer <andreas@a-kretschmer.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Database Refresh confusion
Date: Fri, 13 Jul 2018 14:04:04 +0200
Message-ID: <a8a4bca3-d063-1b40-1ae2-150564833125@a-kretschmer.de> (raw)
In-Reply-To: <142590143.3855746.1531480255648@mail.yahoo.com>
References: <142590143.3855746.1531480255648.ref@mail.yahoo.com>
	<142590143.3855746.1531480255648@mail.yahoo.com>



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





view thread (2+ messages)

Message-ID: <a8a4bca3-d063-1b40-1ae2-150564833125@a-kretschmer.de>
Permalink:  ../a8a4bca3-d063-1b40-1ae2-150564833125@a-kretschmer.de/
Also on:    postgresql.org/message-id/a8a4bca3-d063-1b40-1ae2-150564833125@a-kretschmer.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andreas@a-kretschmer.de
  Subject: Re: Database Refresh confusion
  In-Reply-To: <a8a4bca3-d063-1b40-1ae2-150564833125@a-kretschmer.de>
  References: <142590143.3855746.1531480255648.ref@mail.yahoo.com> <142590143.3855746.1531480255648@mail.yahoo.com> <a8a4bca3-d063-1b40-1ae2-150564833125@a-kretschmer.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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