Linux LVM users
 help / color / mirror / Atom feed
From: Jeff <threshar@torgo.978.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: markw@osdl.org, pgsql-performance@postgresql.org,
	linux-lvm@sistina.com, pgsql-admin@postgresql.org
Subject: [linux-lvm] Re: [PERFORM] backup/restore - another area.
Date: Thu Oct 16 14:06:09 2003	[thread overview]
Message-ID: <20031016133727.469620f0.threshar@torgo.978.org> (raw)
In-Reply-To: <200310161009.27379.josh@agliodbs.com>

On Thu, 16 Oct 2003 10:09:27 -0700
Josh Berkus <josh@agliodbs.com> wrote:

> Jeff,
> 
> > I left the DB up while doing this.
> >
> > Even had a program sitting around committing data to try and corrupt
> > things. (Which is how I discovered I was doing the snapshot wrong)
> 
> Really?   I'm unclear on the method you're using to take the snapshot,
> then; I seem to have missed a couple posts on this thread.   Want to
> refresh me?
> 

I have a 2 disk stripe LVM on /dev/postgres/pgdata/

lvcreate -L4000M -s -n pg_backup /dev/postgres/pgdata
mount /dev/postgres/pg_backup /pg_backup 
tar cf - /pg_backup | gzip -1 > /squeegit/mb.backup 
umount /pg_backup;
lvremove -f /dev/postgres/pg_backup;

In a nutshell an LVM snapshot is an atomic operation that takes, well, a
snapshot of hte FS as it was at that instant.  It does not make a 2nd
copy of the data.   This way you can simply tar up the pgdata directory
and be happy as the snapshot will not be changing due to db activity.

-- 
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/

      reply	other threads:[~2003-10-16 14:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <878ynu9ed5.fsf@stark.dyndns.tv>
2003-10-14 17:20 ` [linux-lvm] Re: [PERFORM] backup/restore - another area markw
2003-10-16  7:56   ` Jeff
2003-10-16 14:06     ` Josh Berkus
2003-10-16 14:06       ` Jeff
2003-10-16 14:06         ` Josh Berkus
2003-10-16 14:06           ` Jeff [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031016133727.469620f0.threshar@torgo.978.org \
    --to=threshar@torgo.978.org \
    --cc=josh@agliodbs.com \
    --cc=linux-lvm@sistina.com \
    --cc=markw@osdl.org \
    --cc=pgsql-admin@postgresql.org \
    --cc=pgsql-performance@postgresql.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox