Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijEY3-0000Wt-IQ for pgsql-general@arkaria.postgresql.org; Mon, 23 Dec 2019 03:38:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ijEY2-0003Dz-C9 for pgsql-general@arkaria.postgresql.org; Mon, 23 Dec 2019 03:38:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ijEY1-0003Dr-SE for pgsql-general@lists.postgresql.org; Mon, 23 Dec 2019 03:38:22 +0000 Received: from mail-bn8nam11on2070.outbound.protection.outlook.com ([40.107.236.70] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ijEXx-0003G6-7O for pgsql-general@lists.postgresql.org; Mon, 23 Dec 2019 03:38:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lsG0S4tgx8ybfQhk/Hb3GUx3wLtDedyHBbpjDTSrSo70knBYVGNHyFqZ0PfHM3gyGkie40fYD+v9FMtM+RFsvZJY2mbCHEiNs+ht8E1jc8uyqzVpOxvFM4+3C2R9HTjkiPy69ePUX+peyQDRxTqQ4RY6QlOp5pHdiF/vSNdSmyJqqsZen/4BGK+aRWRFI52+ZmoYo6icLK95hK8a50GgEaoEoMbXldpP5GOxFGqahLCJoH5Kfm0hkZ5p2O1Z9xsnuV7iEKVg5fG24zDZ7qHrHzMhnGkzz8mKSb2Als5e+Ci86FqzG0wsXHpQlEwXSXjU2qyge3zH04ZwUHtkhhsdHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SCo0Zb3ug5WWq4NACrfRaGUxFqENS0GKa1/zPbEnTMo=; b=iBxGKsX8fSzYOSBmdMB20KuqKAxiEEBIB+NtjxnWMiQJQsVmoYS9poo46gIA9dmTssZCs0NOaKiiYxRmiXra2g8tAAAGk2rwW695n0rjVPzXAVv2A/pztMY/4kaKtkrdP8j9XryoUbSmvlFkM9WkAsnkh/LhkD+K57CX8xEWTXPIrAMNMHA4aYCNVf40Pj78TZeDm/RayAcl1jbGMCgOpJlx8UPMe/91z9Et0liTcIU2I0X8+yYo51f7xwy5A5DHUPezxT5LvgtZi21VFkdWiWxxagFBNTVTheq56OjIIpUo06NtdEYy1b6f24eum/qas2BXBkLANhgQyFQjfRPLPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=exponential.com; dmarc=pass action=none header.from=exponential.com; dkim=pass header.d=exponential.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Exponentialinc.onmicrosoft.com; s=selector2-Exponentialinc-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SCo0Zb3ug5WWq4NACrfRaGUxFqENS0GKa1/zPbEnTMo=; b=tGg0og6fDpt/RewBnUiCzJuqIAlZTbMd96kojh+/V2vU5WHn06GrDDaft8SkVwIO2xstHSP+b2OrdmprbjcDydPwS8rzedFjlNG/PZBVJF0IN4tLQ7jYQto48R9GpjaPzt5s32Hy65b/3+yWek9XyAh++NIZGTMuvCO9LvSySnA= Received: from MN2PR01MB5854.prod.exchangelabs.com (10.255.90.16) by MN2PR01MB5454.prod.exchangelabs.com (20.179.87.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.13; Mon, 23 Dec 2019 03:38:13 +0000 Received: from MN2PR01MB5854.prod.exchangelabs.com ([fe80::587a:1c4c:c9a5:c6e5]) by MN2PR01MB5854.prod.exchangelabs.com ([fe80::587a:1c4c:c9a5:c6e5%6]) with mapi id 15.20.2559.016; Mon, 23 Dec 2019 03:38:12 +0000 From: Daulat Ram To: Adrian Klaver , "pgsql-general@lists.postgresql.org" Subject: Re: pg_basebackup Thread-Topic: pg_basebackup Thread-Index: AdW4rdS7SoT4LGbfQomtqyLufArPhwAQlw2AABSNel0= Date: Mon, 23 Dec 2019 03:38:12 +0000 Message-ID: References: ,<6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com> In-Reply-To: <6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Daulat.Ram@exponential.com; x-originating-ip: [223.225.65.7] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aa2043f8-610f-48fa-e7df-08d7875989b3 x-ms-traffictypediagnostic: MN2PR01MB5454: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2000; x-forefront-prvs: 0260457E99 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(366004)(39830400003)(346002)(396003)(189003)(199004)(8676002)(6512007)(6486002)(64756008)(66476007)(66946007)(66446008)(5660300002)(81156014)(81166006)(8936002)(9686003)(478600001)(76116006)(966005)(91956017)(66556008)(316002)(2906002)(71200400001)(6506007)(110136005)(26005)(55236004)(7116003)(186003)(53546011)(86362001)(21615005);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR01MB5454;H:MN2PR01MB5854.prod.exchangelabs.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: exponential.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aYyFt2BQ4vEkXuWzhqmtcZL6mYOE1XweO86RwPyJYv4eWcPwG+FXOgSWL4cbBzac6FTFqxe5XEtiQDvqTuytRVAX4r/gf0B6K0RSs5xpxBovzJen0HxVtBeuck2DOnhufngjKoEXwVjgGj5J1gWi1JzH9u3DLT7emaoU5BhDUlQpiihE4BUbR3dghmNDcpy0EsZ+2+TmbqFFGNpJxDLaHdUgwu/KWaYC447URcMe/ak6fQulhAtk3YPG4IcyN4Rwf5NZ34DJTiebbxNvCt78cw7qeopSg1jqeVB6+xSs3W6pCj8IxXKiy56ycFukSZWE2moAySLjivNNxkDClMBgSAki26G0Y/368h5nEfknzO5KfP8U7wB3nm8sXMC+HiSL1NMMisjYnp5EOwutKamIsy61fhsNK4MtZrpTUeGVbF1R0Y+k+zHH5VEiDq8HM5pypI/0hbNHTBBhD8FsAvG2lzA//jZThuqSgknQ6a5z5Z8= x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_cfia1kn9m3p2i0qksvr47nu91577072289233emailandroidcom_" MIME-Version: 1.0 X-OriginatorOrg: exponential.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa2043f8-610f-48fa-e7df-08d7875989b3 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2019 03:38:12.5224 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c1877106-092b-492d-8db3-c9fec130d4fd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2GdVU93TUjAoMtQjA/5qBZXWLK704oZfg6f73UgAmIwUMsGdAZvyZbNial6qbUo8QEf01Vf6abe/pAuzDJb9yJglJCrdcSAmopMnGAyQFNU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR01MB5454 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_cfia1kn9m3p2i0qksvr47nu91577072289233emailandroidcom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable thanks Adrian, what about the postmaster.opts file, this file was also skipped in backup. We have single cluster running on the VM. Thanks. On 22-Dec-2019 11:19 PM, Adrian Klaver wrote: 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 =93tar > -xvf base.tar.gz=94 as an output but there is no tar -xvf > pg_wal.tar.gz file exist. > * If we decompress the file =93tar -xvf base.tar.gz=94 , 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 =3D '/var/lib/postgresql/9.5/main' # use data in > another directory # (change requires restart) > > hba_file =3D '/etc/postgresql/9.5/main/pg_hba.conf' # host-based > authentication file # (change requires restart) > > ident_file =3D '/etc/postgresql/9.5/main/pg_ident.conf' # ident > configuration file # (change requires restart) > > postgres=3D# SHOW config_file; > > config_file > > ---------------------------------------------- > > /var/lib/postgresql/9.5/main/postgresql.conf > > (1 row) > > postgres=3D# show hba_file; > > hba_file > > -------------------------------------- > > /etc/postgresql/9.5/main/pg_hba.conf > > (1 row) > > postgres=3D# > > ** > > *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 --_000_cfia1kn9m3p2i0qksvr47nu91577072289233emailandroidcom_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
thanks Adrian, what about the
postmaster.opts file, this file was also skipped in backup= .


We have single  cluster running on the VM.

Thanks.
On 22-Dec-2019 11:19 PM, Adrian Klaver <adr= ian.klaver@aklaver.com> wrote:
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.<= br>
>
>   * Getting the above warning message.
>   * Also the backup has been completed with only the single = file  =93tar
>     -xvf base.tar.gz=94 as an output but there is = no  tar -xvf
>     pg_wal.tar.gz file exist.
>   * If we decompress the file  =93tar -xvf base.tar.gz= =94  , 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 =3D '/var/lib/postgresql/9.5/main'   &nb= sp;     # use data in
> another directory # (change requires restart)
>
> hba_file =3D '/etc/postgresql/9.5/main/pg_hba.conf'   &= nbsp;   # host-based
> authentication file # (change requires restart)
>
> ident_file =3D '/etc/postgresql/9.5/main/pg_ident.conf'   # = ident
> configuration file # (change requires restart)
>
> postgres=3D# SHOW config_file;
>
>             &nb= sp;     config_file
>
> ----------------------------------------------
>
> /var/lib/postgresql/9.5/main/postgresql.conf
>
> (1 row)
>
> postgres=3D# show hba_file;
>
>            &nbs= p;    hba_file
>
> --------------------------------------
>
> /etc/postgresql/9.5/main/pg_hba.conf
>
> (1 row)
>
> postgres=3D#
>
> **
>
> *More details:*
>
> postgres@4ed92bac84af:/var/lib/postgresql/9.5/main$ ls -ltr
>
> total 128
>
> -rw------- 1 postgres postgres   208 Sep 13  2017 backu= p_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_dynshme= m
>
> drwx------ 4 postgres postgres  4096 Sep 13  2017 pg_multixa= ct
>
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_replslo= t
>
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_serial<= br> >
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_snapsho= ts
>
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_stat >
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_stat_tm= p
>
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_tblspc<= br> >
> drwx------ 2 postgres postgres  4096 Sep 13  2017 pg_twophas= e
>
> -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<= br> >
> -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
--_000_cfia1kn9m3p2i0qksvr47nu91577072289233emailandroidcom_--