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 1ij5Ne-0002JA-EP for pgsql-general@arkaria.postgresql.org; Sun, 22 Dec 2019 17:51:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ij5Md-0000YT-3p for pgsql-general@arkaria.postgresql.org; Sun, 22 Dec 2019 17:49:59 +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 1ij5Mb-0000YL-05 for pgsql-general@lists.postgresql.org; Sun, 22 Dec 2019 17:49:58 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ij5MS-0006ry-D4 for pgsql-general@lists.postgresql.org; Sun, 22 Dec 2019 17:49:56 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C04F021D25; Sun, 22 Dec 2019 12:49:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 22 Dec 2019 12:49:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=h Cl92Y6V9rgDs/2/Yc10J2auv22ipUv52PMpT74swEc=; b=zv1d72eBaXjJkDqMp yxNKm3iaZBopFqIdnuJQ3ytyZbHswoiKRFEr/mnYvXl0QBKClwubBzKL3qiB0b9J a7qVbkmzXNTvCfEjpszo2XVT8jEjo0u0ARPALiC3IpyfuFbeMRr7wDnsMmkBlpwS 4IuEwYQtYIB3P7kjGf2mkANbYR6SiVhKSP5INbSHqxl84xwym5SZij+4Dr0Z+SpW s4ZZfTsYg7xZD3DlzUXSMUxF8AS21otk5Y88+S29u/Fcr6PwOwL1sRURO8hzZpgG SjvrHQVGXbM12vavPKg5K3/a8/FQ0CUjLWUmlpldJWkaHSRQ+ynyNcspzWFYPwWb j37wg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=hCl92Y6V9rgDs/2/Yc10J2auv22ipUv52PMpT74sw Ec=; b=mJUOjVZoWN6Qj9NAbUUhRZ+Iw8voOW5pmehcwejfgevAHZnPhWMYZlxWY WtJkLoLXsZnQ+GnA7vAPVlv3r/4V0vJLuCuXNHus9q5/O0VKPX1cVwc0JSlvsRi2 l81awj/Afq2npv7yIRPynV4IWfl9ATEUCvZ1NHGVy2xjYpbnBr8ITcUmBwlGBagc qddmUtzbqr7WqcQ7++SwOUjYaQ9ZIfHETzQZpXONaU3F2hku7qVeMRrZcuaSyXWg I7ufg3O0IMINQ48+moeIdtFGT65go2YYVmA6NHq6Bc9uyzBL2o+nXkq/OOazy/V8 eYczuFyeWyqBRJe6QWg1DVGcd7wZw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddukedguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeehnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepjedurddv uddvrdduvdelrdduleefnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkh hlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.2] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id 159E73060B1D; Sun, 22 Dec 2019 12:49:43 -0500 (EST) Subject: Re: pg_basebackup To: Daulat Ram , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: <6cd62b06-8f0c-06c8-4e30-1cbb2570a3fa@aklaver.com> Date: Sun, 22 Dec 2019 09:49:43 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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