Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beGmu-0000G7-Gh for pgsql-admin@arkaria.postgresql.org; Mon, 29 Aug 2016 07:15:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1beGmu-00089E-2c for pgsql-admin@arkaria.postgresql.org; Mon, 29 Aug 2016 07:15:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1beGlC-0006CP-LW for pgsql-admin@postgresql.org; Mon, 29 Aug 2016 07:13:34 +0000 Received: from mailfilter.hostsailor.net ([109.201.130.65]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beGl8-0003l0-Cw for pgsql-admin@postgresql.org; Mon, 29 Aug 2016 07:13:33 +0000 X-ASG-Debug-ID: 1472454806-09e04e57581c4deb0001-ysJW5H Received: from localhost.localdomain (ec1.envio-certo.us [185.45.192.70]) by mailfilter.hostsailor.net with ESMTP id LZMBnfTdHl64sIk4 for ; Mon, 29 Aug 2016 00:13:26 -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 1beGl3-0003iL-Fh for pgsql-admin@postgresql.org; Mon, 29 Aug 2016 10:13:25 +0300 Received: from localhost.localdomain ([127.0.0.1]) (SquirrelMail authenticated user mandylaz) by 127.0.0.1 with HTTP; Mon, 29 Aug 2016 10:13:25 +0300 Message-ID: <14fa203f89daa60be46db181e2f456a7.squirrel@127.0.0.1> Date: Mon, 29 Aug 2016 10:13:25 +0300 Subject: run copy of database on another (backup) server From: "Marchello Lippi" X-ASG-Orig-Subj: 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: 1472454806 X-Barracuda-URL: https://109.201.130.65:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1607 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.32415 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 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. Regards, -- Marchello Lippi -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin