pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Daulat Ram <Daulat.Ram@exponential.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg_basebackup
Date: Sun, 22 Dec 2019 09:49:43 -0800
Message-ID: <6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com> (raw)
In-Reply-To: <MN2PR01MB585462A6B09B1F3A20AFDD7D9B2F0@MN2PR01MB5854.prod.exchangelabs.com>
References: <MN2PR01MB585462A6B09B1F3A20AFDD7D9B2F0@MN2PR01MB5854.prod.exchangelabs.com>

On 12/22/19 1:56 AM, Daulat Ram wrote:
> Hello,
> 
> I am taking pg_basebackup of primary db (docker container env.) using 
> the below command :
> 
> pg_basebackup -x -h vmzti -U replication -D 
> /etc/postgresql/9.5/main/pg_basebkp/basekp1224 -Ft -z -P
> 
> Password:
> 
> WARNING:  skipping special file "./postgresql.conf"
> 
> WARNING:  skipping special file "./postgresql.conf"
> 
> 4048512/4048512 kB (100%), 1/1 tablespace


https://www.postgresql.org/docs/9.5/app-pgbasebackup.html

"The backup will include all files in the data directory and 
tablespaces, including the configuration files and any additional files 
placed in the directory by third parties. But only regular files and 
directories are copied. Symbolic links (other than those used for 
tablespaces) and special device files are skipped. (See Section 50.3 for 
the precise details.)"

postgresql.conf is a symlink in the data directory so it is being skipped.

> 
>   * Getting the above warning message.
>   * Also the backup has been completed with only the single file  “tar
>     -xvf base.tar.gz” as an output but there is no  tar -xvf
>     pg_wal.tar.gz file exist.
>   * If we decompress the file  “tar -xvf base.tar.gz”  , I do not see
>     the postmaster.opts file.


Do you have more then one instance of Postgres running?

If so are you certain which one pg_basebackup is being pointed at?

> 
> Note: We have the different path for the conf files :
> 
> data_directory = '/var/lib/postgresql/9.5/main'         # use data in 
> another directory # (change requires restart)
> 
> hba_file = '/etc/postgresql/9.5/main/pg_hba.conf'       # host-based 
> authentication file # (change requires restart)
> 
> ident_file = '/etc/postgresql/9.5/main/pg_ident.conf'   # ident 
> configuration file # (change requires restart)
> 
> postgres=# SHOW config_file;
> 
>                   config_file
> 
> ----------------------------------------------
> 
> /var/lib/postgresql/9.5/main/postgresql.conf
> 
> (1 row)
> 
> postgres=# show hba_file;
> 
>                 hba_file
> 
> --------------------------------------
> 
> /etc/postgresql/9.5/main/pg_hba.conf
> 
> (1 row)
> 
> postgres=#
> 
> **
> 
> *More details:*
> 
> postgres@4ed92bac84af:/var/lib/postgresql/9.5/main$ ls -ltr
> 
> total 128
> 
> -rw------- 1 postgres postgres   208 Sep 13  2017 backup_label.old
> 
> drwx------ 8 postgres postgres  4096 Sep 13  2017 base
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_commit_ts
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_dynshmem
> 
> drwx------ 4 postgres postgres  4096 Sep 13  2017 pg_multixact
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_replslot
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_serial
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_snapshots
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_stat
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_stat_tmp
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_tblspc
> 
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_twophase
> 
> -rw------- 1 postgres postgres     4 Sep 13  2017 PG_VERSION
> 
> -rw------- 1 postgres postgres    88 Sep 13  2017 postgresql.auto.conf
> 
> -rwxr-xr-x 1 postgres postgres 22116 Sep 13  2017 postgresql.conf.orig
> 
> drwx------ 2 postgres postgres 12288 Sep 13  2017 pg_log
> 
> lrwxrwxrwx 1 postgres postgres    38 Sep 13  2017 recovery.conf -> 
> /etc/postgresql/9.5/main/recovery.conf
> 
> lrwxrwxrwx 1 postgres postgres    40 Sep 13  2017 postgresql.conf -> 
> /etc/postgresql/9.5/main/postgresql.conf
> 
> -rw------- 1 postgres postgres    90 May 21  2019 postmaster.pid
> 
> drwx------ 2 postgres postgres  4096 May 21  2019 pg_notify
> 
> -rw------- 1 postgres postgres    46 May 21  2019 postmaster.opts
> 
> drwx------ 2 postgres postgres  8192 Dec 11 08:10 global
> 
> drwx------ 2 postgres postgres  4096 Dec 17 20:12 pg_clog
> 
> drwx------ 2 postgres postgres  4096 Dec 17 20:16 pg_subtrans
> 
> drwxrwxrwx 2 postgres postgres  4096 Dec 18 08:31 backup
> 
> drwx------ 3 postgres postgres  4096 Dec 18 15:56 pg_xlog
> 
> drwx------ 4 postgres postgres  4096 Dec 18 16:31 pg_logical
> 
> postgres@4ed92bac84af:/var/lib/postgresql/9.5/main$
> 
> ident.conf
> 
> Please advise.
> 
> Thanks,
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (8+ messages)  latest in thread

Message-ID: <6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com>
Permalink:  ../6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com/
Also on:    postgresql.org/message-id/6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com

 · 

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: adrian.klaver@aklaver.com, Daulat.Ram@exponential.com
  Subject: Re: pg_basebackup
  In-Reply-To: <6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com>
  References: <MN2PR01MB585462A6B09B1F3A20AFDD7D9B2F0@MN2PR01MB5854.prod.exchangelabs.com> <6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com>

* 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