Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f8FdE-0005ND-M6 for pgsql-general@arkaria.postgresql.org; Tue, 17 Apr 2018 01:42:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f8FdC-00004u-Sq for pgsql-general@arkaria.postgresql.org; Tue, 17 Apr 2018 01:42:02 +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.89) (envelope-from ) id 1f8FdC-0008WQ-Fm for pgsql-general@lists.postgresql.org; Tue, 17 Apr 2018 01:42:02 +0000 Received: from mail-ot0-x22c.google.com ([2607:f8b0:4003:c0f::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f8Fd9-0002ad-Ax for pgsql-general@postgresql.org; Tue, 17 Apr 2018 01:42:00 +0000 Received: by mail-ot0-x22c.google.com with SMTP id a14-v6so19674047otf.6 for ; Mon, 16 Apr 2018 18:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=/M6ReheoFOIu9IPaC8Pzcs2jnCd8gfL3UigJBHOQEsw=; b=Zh8Jh+yVx5CmcZQ4BjATFWqLOSRvvqO2NuUWwW9wcGBShvvIA2b/Rna4RND/js/+H0 0vUUf4B62fKPkQ7+vQMNfbiVoFQXQaCb0IFHfx9Hn5fRFafLPyQuEGlgOTzVlhX0xhyy uXQtMDrjCzMW82Rg3j3C80LjIjVn9AfME5mKmp+Sc3zZZyiUmvc4jY2qaRpYqgWqzXya JrGD4rO52hnn9c/qg1BBJhJo8CR9i2dLEQNH7NCo/9i39pkxtCXHIJ4Ink1UVMVl6DK5 xmq6INErJbzOk6/HZVvmcIzBuoNIvHz+H0KE/eenlLsuScFVkFkj0ycbOpLeTxu6boPS bwCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/M6ReheoFOIu9IPaC8Pzcs2jnCd8gfL3UigJBHOQEsw=; b=UtnWHMR46MlGnj1q1yY7+J9cdvHza3Z8itWM1JKk/e7dlLZHCC+sPge9U1OAvAuost RLkwYYWl4xHp+h4WjTQioX1HlRyaIgYNBMZwnMlQfJlgHPT1jbwsUpuzBkkE3VoVDkBL /Bv1N4HdakdTW8imSjtpon/7uBBQgv9trdMYziS1K/BIOtoG/vRK9d6LtXi8A6yygYhp y2hzkbtO9qa7L7RDxqQBW76xutUU03FIR6f3hgZ7/karQ0KvsA+7TeKCNu0YJw7l+2NX sSlJZBN0/yPHX9MYYyJql+FDiyKp8WKVXXjY7NMKtAUDZARPLfeRxiMclaJlR9vOw7+0 GI0g== X-Gm-Message-State: ALQs6tAvqdSvkmczaRCNL1abI83Tph0qi3+VGgweGB4HEqI06TDqTiOM NgGq6zR1+Ph47/zDIpMsTH1Smw== X-Google-Smtp-Source: AIpwx4/qZqYaQMelumhUsAALifLVFL9+D37RgiWVlBoebuT0EuUVghM1IZAsCNANv7dQCK/V9ae8HQ== X-Received: by 2002:a9d:2186:: with SMTP id s6-v6mr81529otb.133.1523929317927; Mon, 16 Apr 2018 18:41:57 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id t123-v6sm8143813oie.41.2018.04.16.18.41.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 18:41:56 -0700 (PDT) Subject: Re: pg_dump to a remote server To: pgsql-general References: <53c302b2-a634-96c2-b1f5-328437eb37fd@gmail.com> From: Ron Message-ID: Date: Mon, 16 Apr 2018 20:41:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 04/16/2018 07:47 PM, Gao Jack wrote: >> -----Original Message----- >> From: Ron >> Sent: Tuesday, April 17, 2018 7:59 AM >> To: pgsql-general >> Subject: pg_dump to a remote server >> >> We're upgrading from v8.4 to 9.6 on a new VM in a different DC.  The dump >> file will be more than 1TB, and there's not enough disk space on the current >> system for the dump file. >> >> Thus, how can I send the pg_dump file directly to the new server while the >> pg_dump command is running?  NFS is one method, but are there others >> (netcat, rsync)?  Since it's within the same company, encryption is not >> required. >> >> Or would it be better to install both 8.4 and 9.6 on the new server (can I >> even install 8.4 on RHEL 6.9?), rsync the live database across and then set >> up log shipping, and when it's time to cut over, do an in-place pg_upgrade? >> >> (Because this is a batch system, we can apply the data input files to bring >> the new database up to "equality" with the 8.4 production system.) >> >> Thanks >> >> -- >> Angular momentum makes the world go 'round. > Hi > > https://www.postgresql.org/docs/current/static/backup-dump.html#BACKUP-DUMP-RESTORE > > ... > ... > > The ability of pg_dump and psql to write to or read from pipes makes it possible to dump a database directly from one server to another, for example: > > pg_dump -h host1 dbname | psql -h host2 dbname But that assumes --format=plain which will send a whole lot of uncompressed text across the wire. -- Angular momentum makes the world go 'round.