Re: The OS Command for pg_hotbackup -- Use lvmsnapshot instead of tar cvzf

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: "Arnold, Sandra" <ArnoldS(at)osti(dot)gov>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: The OS Command for pg_hotbackup -- Use lvmsnapshot instead of tar cvzf
Date: 2010-03-02 19:54:29
Message-ID: dcc563d11003021154h7da61c9dg2aee52cf08da8f3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Tue, Mar 2, 2010 at 12:20 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> On Tue, Mar 2, 2010 at 8:43 AM, Arnold, Sandra <ArnoldS(at)osti(dot)gov> wrote:
>> I am currently using the pg_hotbackup Perl script to backup my production
>> PostgreSQL database.  However, the next production database is going to be
>> close to a terrabyte in size.  We feel that a tar cvzf command is not the
>> correct OS backup solution to use.  Instead we would like to use
>> lvmsnapshot.  Is anyone using the pg_hotbackup script but instead of the tar
>> cvzf OS command are they using lvmsnapshot?
>>
>> Or, is anyone using lvmsnapshot and doing point-in-time recoveries?
>
> I do not run my databases on LVM because, at least in the past, LVM
> did not properly honor fsync / write barrier commands.  I don't know
> if this has since  been fixed.   If your transaction rate on LVM is
> unnaturally higher than it should / could be, then suspect it is not
> fsyncing, and putting your data on it is putting it at risk.

From what I've read further on, it seems it's ok as long as it's on a
storage system like a battery backed RAID controller. Still, someone
on the list did some testing and LVM resulted in a reduced throughput
when on large fast RAID arrays, so do some testing before you set off
into production with LVM.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Major Services 2010-03-03 04:28:13 Re: Restart failed with 'service postgresql restart'
Previous Message Scott Marlowe 2010-03-02 19:24:06 Re: The OS Command for pg_hotbackup -- Use lvmsnapshot instead of tar cvzf

Browse pgsql-general by date

  From Date Subject
Next Message akp geek 2010-03-02 21:11:51 FSM and VM file
Previous Message Scott Marlowe 2010-03-02 19:24:06 Re: The OS Command for pg_hotbackup -- Use lvmsnapshot instead of tar cvzf