Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beID8-0000BI-Kc for pgsql-admin@arkaria.postgresql.org; Mon, 29 Aug 2016 08:46:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1beID7-0000Nt-Ju for pgsql-admin@arkaria.postgresql.org; Mon, 29 Aug 2016 08:46:29 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1beID6-0000NM-SI for pgsql-admin@postgresql.org; Mon, 29 Aug 2016 08:46:28 +0000 Received: from mailfilter.hostsailor.net ([109.201.130.65]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beICz-0003sv-Rk for pgsql-admin@postgresql.org; Mon, 29 Aug 2016 08:46:28 +0000 X-ASG-Debug-ID: 1472460379-09e04e57581d291a0001-ysJW5H Received: from localhost.localdomain (ec1.envio-certo.us [185.45.192.70]) by mailfilter.hostsailor.net with ESMTP id JsesXoykFM1dndmC for ; Mon, 29 Aug 2016 01:46:19 -0700 (PDT) X-Barracuda-Envelope-From: postgresql.org@marchello.tk X-Barracuda-Effective-Source-IP: ec1.envio-certo.us[185.45.192.70] X-Barracuda-Apparent-Source-IP: 185.45.192.70 Received: from localhost.localdomain ([127.0.0.1]) by localhost.localdomain with esmtp (Exim 4.82) (envelope-from ) id 1beICw-000421-Je for pgsql-admin@postgresql.org; Mon, 29 Aug 2016 11:46:19 +0300 Received: from localhost.localdomain ([127.0.0.1]) (SquirrelMail authenticated user mandylaz) by 127.0.0.1 with HTTP; Mon, 29 Aug 2016 11:46:18 +0300 Message-ID: <64c2847d5a84cecc9a37286f3f2920dc.squirrel@127.0.0.1> In-Reply-To: <14fa203f89daa60be46db181e2f456a7.squirrel@127.0.0.1> References: <14fa203f89daa60be46db181e2f456a7.squirrel@127.0.0.1> Date: Mon, 29 Aug 2016 11:46:18 +0300 Subject: Re: run copy of database on another (backup) server From: "Marchello Lippi" X-ASG-Orig-Subj: Re: [ADMIN] run copy of database on another (backup) server To: pgsql-admin@postgresql.org User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Barracuda-Connect: ec1.envio-certo.us[185.45.192.70] X-Barracuda-Start-Time: 1472460379 X-Barracuda-URL: https://109.201.130.65:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1875 X-Virus-Scanned: by bsmtpd at hostsailor.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.32417 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Fixed using stopped postgres chown postgres:postgres /var/lib/postgresql/9.3/main -R chmod 0700 /var/lib/postgresql/9.3/main -R started postgres Regards, -- Marchello Lippi Marchello Lippi wrote: > Hi all, > > I tried to run copy of my database on another server. > > Found its path using > Code: > > SHOW data_directory > > it is /var/lib/postgresql/9.3/main > > Put it into tar.gz archive using sudo on main server, copied archive into > backup server, stopped postgresql on backup server, extracted archive into > /var/lib/postgresql/9.3/main2 directory, changed data_directory path in > /etc/postgresql/9.3/main/postgresql.conf, tried to start postgresql on > backup server, but got error: > > $ sudo service postgresql start > * Starting PostgreSQL 9.3 database server > * Error: could not exec /usr/lib/postgresql/9.3/bin/pg_ctl > /usr/lib/postgresql/9.3/bin/pg_ctl start -D /var/lib/postgresql/9.3/main2 > -l /var/log/postgresql/postgresql-9.3-main.log -s -o -c > config_file="/etc/postgresql/9.3/main/postgresql.conf" : > [fail] > > Tried to put files into default directory and changed back path in conf > file, then tried to start postgresql on backup server, got error again: > > $ sudo service postgresql start > * Starting PostgreSQL 9.3 database server > * Error: could not exec /usr/lib/postgresql/9.3/bin/pg_ctl > /usr/lib/postgresql/9.3/bin/pg_ctl start -D /var/lib/postgresql/9.3/main > -l /var/log/postgresql/postgresql-9.3-main.log -s -o -c > config_file="/etc/postgresql/9.3/main/postgresql.conf" : > [fail] > > How do I solve it? > I suppose, I should change rights after extracting files from archive > under sudo, but don't know what exactly to change. > > versions (on both main and backup servers) > Ubuntu 14.04.5 LTS > Postgresql 9.3 > > Please advise. > Thanks ahead. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin