Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeoDa-0002tO-Ja for pgsql-performance@arkaria.postgresql.org; Tue, 21 May 2013 15:11:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UeoDa-00030M-3d for pgsql-performance@arkaria.postgresql.org; Tue, 21 May 2013 15:11:14 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeoDZ-00030H-9T for pgsql-performance@postgresql.org; Tue, 21 May 2013 15:11:13 +0000 Received: from cerberus.pinpointresearch.com ([66.7.238.130] helo=polaris.pinpointresearch.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UeoDX-0001xx-22 for pgsql-performance@postgresql.org; Tue, 21 May 2013 15:11:12 +0000 Received: from [192.168.1.179] (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id 2A3CCE00EC83; Tue, 21 May 2013 08:11:11 -0700 (PDT) Message-ID: <519B8E92.6070105@pinpointresearch.com> Date: Tue, 21 May 2013 08:11:14 -0700 From: Steve Crawford User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Jeison Bedoya CC: pgsql-performance@postgresql.org Subject: Re: performance database for backup/restore References: <519B743F.7040407@audifarma.com.co> In-Reply-To: <519B743F.7040407@audifarma.com.co> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 05/21/2013 06:18 AM, Jeison Bedoya wrote: > Hi people, i have a database with 400GB running in a server with 128Gb > RAM, and 32 cores, and storage over SAN with fiberchannel, the problem > is when i go to do a backup whit pg_dumpall take a lot of 5 hours, > next i do a restore and take a lot of 17 hours, that is a normal time > for that process in that machine? or i can do something to optimize > the process of backup/restore. It would help to know what you wish to solve. I.e. setting up a test/dev server, testing disaster-recovery, deploying to a new server, etc. Also, are you dumping to a file then restoring from a file or dumping to a pipe into the restore? If you use the custom format in pg_dump *and* are dumping to a file *and* restoring via pg_restore, you can set the -j flag to somewhat fewer than the number of cores (though at 128 cores I can't say where the sweet spot might be) to allow pg_restore to run things like index recreation in parallel to help your restore speed. You can also *temporarily* disable fsync while rebuilding the database - just be sure to turn it back on afterward. Copying the files is not the recommended method for backups but may work for certain cases. One is when you can shut down the database so the whole directory is quiescent while you copy the files. Also, depending on your SAN features, you *might* be able to do a snapshot of the running PostgreSQL data directory and use that. > > > > Postgres version 9.2.2 ... ...has a nasty security issue. Upgrade. Now. Cheers, Steve -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance