Re: file-system snapshot under freebsd for backup - Mailing list pgsql-general

From Bill Moran
Subject Re: file-system snapshot under freebsd for backup
Date
Msg-id 20070802103018.838b252a.wmoran@potentialtech.com
Whole thread Raw
In response to Re: file-system snapshot under freebsd for backup  (ProAce <proace@gmail.com>)
List pgsql-general
In response to ProAce <proace@gmail.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@potentialtech.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

pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: Linux distro
Next
From: Vincenzo Romano
Date:
Subject: SQL function and "UPDATE...RETURNING"