Skip site navigation (1) Skip section navigation (2)

Re: Hard link / rsync backup strategy successful

From: Greg Spiegelberg <gspiegelberg(at)gmail(dot)com>
To: Chander Ganesan <chander(at)otg-nc(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, "[ADMIN]" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Hard link / rsync backup strategy successful
Date: 2009-07-14 21:14:09
Message-ID: 22723570907141414x40d843f6xdfeb80b8aa7fec72@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
I'm in agreement.  That is a recipe for a failed recovery.

If you must use some file system / volume trickery to get an initial backup
then I would suggest looking into LVM or some similar volume manager.  For
beginners, take a look at the link below.

  http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html

The technique does work however if you're using the PostgreSQL PITR backup
method, which is what I am guessing at, then you're only adding overhead and
complexity to the process.

Greg


On Tue, Jul 14, 2009 at 3:03 PM, Chander Ganesan <chander(at)otg-nc(dot)com> wrote:

> Kevin,
>
> Kevin Grittner wrote:
>
>> As a follow-up to this:
>>  http://archives.postgresql.org/pgsql-admin/2009-03/msg00233.php
>>
>>
> I just read this post.  What exactly does doing the hard link buy you here?
>  Since it's just another inode pointer to the same file, I fail to see what
> the purpose of it is...  For example, take a look at the code below :
>
> chander(at)bender:~$ echo "apple" > a
> chander(at)bender:~$ cat a
> apple
> chander(at)bender:~$ cp -l a b
> chander(at)bender:~$ cat b
> apple
> chander(at)bender:~$ echo "pear" > a
> chander(at)bender:~$ cat b
> pear
>
> Just curious...  It seems that the method described in your email (creating
> a backup using 'cp -l' and then using rsync) would "break" your old backup
> (the hard link copy) since some of the files in it would be modified, but it
> would be missing the "new" files that were added to the backup.  Essentially
> making your "old" backup an incomplete backup of your new cluster.
>
> In essence, a "hard link" isn't a copy of any sort, it's just a pointer to
> the same inode, which is the exact same data...
>
> Perhaps there is something that I am missing here?
>
> Thanks
>
> --
> Chander Ganesan
> Open Technology Group, Inc.
> One Copley Parkway, Suite 210
> Morrisville, NC  27560
> 919-463-0999/877-258-8987
> http://www.otg-nc.com
> Expert PostgreSQL, PostGIS, and other Open Source training delivered
> world-wide.
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

In response to

Responses

pgsql-admin by date

Next:From: Thomas KirchtagDate: 2009-07-15 06:33:08
Subject: PostgreSQL/PAM problem
Previous:From: Chander GanesanDate: 2009-07-14 21:03:34
Subject: Re: Hard link / rsync backup strategy successful

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group