Re: backup postgresql with snapshot AWS

From: flumbador(at)virgilio(dot)it
To: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: backup postgresql with snapshot AWS
Date: 2018-01-23 12:31:02
Message-ID: 1509665143.1676025.1516710662584@mail.virgilio.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

pgpdbabe(at)elaawddbad00:/pgsql/pdbabe/data/pdbabe/pg_tblspc> df /pgsql/pdbabe/* | sort -u
/dev/mapper/pdbabe_2-lv_archive 102180192 60291608 36698136 63% /pgsql/pdbabe/archive
/dev/mapper/pdbabe_2-lv_staging 19610300 4810764 13803392 26% /pgsql/pdbabe/staging
/dev/mapper/pdbabe-lv_admin 10321208 241396 9555524 3% /pgsql/pdbabe/admin
/dev/mapper/pdbabe-lv_data 10321208 177628 9619292 2% /pgsql/pdbabe/data
/dev/mapper/pdbabe-lv_tsdata 258030980 45415480 199508300 19% /pgsql/pdbabe/tsdata
/dev/mapper/pdbabe-lv_tsindex 103212320 192268 97777172 1% /pgsql/pdbabe/tsindex
/dev/mapper/pdbabe-lv_tstemp 51606140 184268 48800432 1% /pgsql/pdbabe/tstemp
/dev/mapper/pdbabe-lv_xlog 51606140 16259012 32725688 34% /pgsql/pdbabe/xlog
Filesystem 1K-blocks Used Available Use% Mounted on

elaawddbad00:~ # pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 system lvm2 a-- 50.00g 10.55g
/dev/xvdc pdbabe lvm2 a-- 510.00g 40.00g
/dev/xvdd pdbabe_2 lvm2 a-- 120.00g 2.00g

Thanks & Regards
Gabriele

> Il 23 gennaio 2018 alle 12.08 Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com> ha scritto:
>
>
> On 23/01/2018 13:02, flumbador(at)virgilio(dot)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 <rui(dot)desousa(at)icloud(dot)com> 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
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message pavan95 2018-01-23 13:35:22 Re: Too many WAL archive files
Previous Message Achilleas Mantzios 2018-01-23 11:08:19 Re: backup postgresql with snapshot AWS