Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVVne-0001xG-Od for pgsql-general@arkaria.postgresql.org; Thu, 22 Oct 2020 08:18:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kVVnd-0007Bv-IW for pgsql-general@arkaria.postgresql.org; Thu, 22 Oct 2020 08:18:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVVnd-0007BS-A9 for pgsql-general@lists.postgresql.org; Thu, 22 Oct 2020 08:18:17 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVVna-0007XE-UX for pgsql-general@postgresql.org; Thu, 22 Oct 2020 08:18:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8IsjrpXavpEAmN/Dzq6eapl7no9ZLYb+yzqpnmn0bNg=; b=Vw0R9QyXMyTtiZARBOZdD4Qe1K C/95FhqFRRWFk7/b7VBUVRTNn5Y2iyzqHc1gY6e6XHzq1qWHyKyrs1ZJiAeZQZsJPJh5cEM2RYTzs SDU/2e+pW0c2vAFgURqClNHFcd50Fw1AS/f+/ygHBZirpXiRCmuQe/t1QXIEGkQu/aSk=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1kVVnY-0002gc-TG; Thu, 22 Oct 2020 10:18:12 +0200 Date: Thu, 22 Oct 2020 10:18:12 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: "W.P." Cc: pgsql-general mailing list Subject: Re: Hot backup in PostgreSQL Message-ID: <20201022081812.GA4030@depesz.com> Reply-To: depesz@depesz.com References: <486ad2c5-01e0-fbf7-b09d-88898b28cdb0@wp.pl> <20201022073517.GA22554@depesz.com> <17611fd6-ab17-793a-3bf9-74bfb719a1eb@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <17611fd6-ab17-793a-3bf9-74bfb719a1eb@wp.pl> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Oct 22, 2020 at 09:45:36AM +0200, W.P. wrote: > > There are many ways to do it. To be able to suggest proper solution we'd > > need to know: > > 1. what is the problem with pg_dump? > Time (I guess a bit, but copying files could be done using rsync, so much > faster). Is it *really* too slow for you? Please note that you can easily make it much faster by doing -Fd -j $( nproc ). > > 2. what is the exact problem you're solving (clearly it's not only > > "having backup", as this is done using pg_dump without any problem). > Maybe this is old way, but at some point of time I was doing Oracle 8 > backups just by copying files. > Also I guess, restore using copy files should be much faster than using psql > / pg_restore. You might want to read this: https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP Best regards, depesz