Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edwRH-0006yq-UW for pgsql-admin@arkaria.postgresql.org; Tue, 23 Jan 2018 11:08:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1edwRH-0007HL-9c for pgsql-admin@arkaria.postgresql.org; Tue, 23 Jan 2018 11:08:27 +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 1edwRH-0007HC-2b for pgsql-admin@lists.postgresql.org; Tue, 23 Jan 2018 11:08:27 +0000 Received: from host3.dynacom.ondsl.gr ([62.103.35.211] helo=smadev.internal.net) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1edwRE-0005xB-BJ for pgsql-admin@lists.postgresql.org; Tue, 23 Jan 2018 11:08:26 +0000 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id w0NB8JAk027269 for ; Tue, 23 Jan 2018 13:08:20 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: backup postgresql with snapshot AWS To: pgsql-admin@lists.postgresql.org References: <166191299.1443519.1516368751643@mail.virgilio.it> <58e57feb-1a0a-bb44-55a6-5c94d294de9e@pgmasters.net> <2ce36d42-c90a-ed10-173d-7b8445c1cec9@denninger.net> <863cffbe-0c4b-bcda-189d-3026bc949c95@denninger.net> <5F7F898C-23FD-4543-8623-BF9FFDE648B7@icloud.com> <725266372.1794661.1516705371389@mail.virgilio.it> From: Achilleas Mantzios Message-ID: <3d79b954-55d1-a042-a819-5024ed9a2b9e@matrix.gatewaynet.com> Date: Tue, 23 Jan 2018 13:08:19 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <725266372.1794661.1516705371389@mail.virgilio.it> 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 23/01/2018 13:02, flumbador@virgilio.it wrote: > Hi > I confirm that we have only one EBS volume, but Postgresql spans multiple filesystem on that EBS volume. > Filesystems are: > > /pgsql/pdbabe/data => PGDATA > /pgsql/pdbabe/tsdata => Tablespace Data > /pgsql/pdbabe/tsindex => Tablespace Index > /pgsql/pdbabe/tstemp => Tablespace temporary > /pgsql/pdbabe/xlog => pg_xlog filesystem != directory. Do a % df /pgsql/pdbabe/* | sort -u to show you all filesystems involved. Might be only one. > > But all on the same EBS Volume. > Does snapshot work fine in this scenario? > > Thanks & Regards > Gabriele > >> Il 19 gennaio 2018 alle 20.39 Rui DeSousa ha scritto: >> >> >> >>> IMHO the more you intertwine things you cannot be certain of because they operate outside of your particular VM's space with a process that relies on them the more you are risking finding out that your assumptions are wrong the hard way. You *shouldn't* get bit by this in a well-designed cloud or cluster system but that's not an acceptable word to describe the expected results when it's important. >> One needs to understand their technology stack. You need to know where your data is after a sync() call… is it cached in the controller, some other application layer, or safely on disk? You also need to understand the relationship between luns, volume managers, and filesystems and where your atomic operation are in your setup. >> >> i.e. If the filesystem spans multiple EBS volumes then you can’t use EBS snapshots otherwise you end up with a corrupted filesystem/database; however, if you use one filesystem per EBS volume then EBS snapshots work fine. Amazon’s own RDS service uses EBS snapshots for backups. -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt