Re: file-system snapshot under freebsd for backup

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: ProAce <proace(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: file-system snapshot under freebsd for backup
Date: 2007-08-02 14:30:18
Message-ID: 20070802103018.838b252a.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to ProAce <proace(at)gmail(dot)com>:

> I use SAN, not NAS. :)
>
> Because some bugdet issue, I just have a basic SAN environment.
> For multipathing, I use geom_fox to complete.
> For snapshot, I want to use mksnap_ffs.
>
> But I don't have any experience of using mksnap_ffs to backup pgsql.
> Does anyone give me some advice?

If you don't want to do PITR, read this:
http://www.postgresql.org/docs/8.2/static/backup-file.html

You can also use the mount command to make filesystem snapshots.
Assuming your PG data directory is under the mount point /var/db:

mount -o snapshot -u /var/db/snapshot /var/db
mdconfig -a -t vnode -f /var/db/snapshot -u 4
mount -r /dev/md4 /mnt
[ ... do whatever you do to back up /mnt (which is the snapshot of
/var/db ...]
umount /mnt
mdconfig -d -u 4
rm /var/db/snapshot

> 2007/8/2, Bill Moran <wmoran(at)potentialtech(dot)com>:
> >
> > Maybe. I'm confused by your question, but:
> > * If the data directory is on an FFS2 volume on a FreeBSD machine, you
> > can use mksnap_ffs to back it up, and that approach is actually
> > recommended for PITR-type backups.
> > * If the data is mounted via NFS or something similar and the filesystem
> > is not FFS2, then snapshots are not available on FreeBSD.
> >
> > --
> > Bill Moran
> > http://www.potentialtech.com
> >

--
Bill Moran
http://www.potentialtech.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2007-08-02 14:48:53 Re: pgTray - win32 tray tool for monitoring PostgreSQL service
Previous Message Michael Knudsen 2007-08-02 14:08:50 Re: Restrict access