Thread: file-system snapshot under freebsd for backup
I already put the data directory on hds san storage, but there is no snapshot license on it. Could I use mksnap_ffs under freebsd to make snapshot for backup ?
In response to ProAce <proace@gmail.com>: > I already put the data directory on hds san storage, but there is no > snapshot license on it. > Could I use mksnap_ffs under freebsd to make snapshot for backup ? 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
The size of my db is more then 50GB , so I consider that the pg_dump is not a good backup tool for me. And, sometimes, I need query data which is some days ago ( between 1 ~ 14 days ). If I want to transfer my db to different PG version, I will use slony-I. :) I worried that mksnap_ffs spend much time on making a new snapshot. I don't know whether PG work very well during the period of making snapshot. Or the snapshot be made successfully when the PG execute / commit sql statments continuously. 2007/8/2, Naz Gassiep <naz@mira.net>: > Have you considered using pg_dump to backup your databases? Taking > file-level snapshots is not recommended as you may want/need to restore to a > different version of PG that is not binary compatible with the snapshot > you've taken. > Regards, > - Naz. > > > ProAce wrote: > I already put the data directory on hds san storage, but there is > no snapshot license on it. Could I use mksnap_ffs under freebsd to make > snapshot for backup ? ---------------------------(end of > broadcast)--------------------------- TIP 6: explain > analyze is your friend >
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? 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 >
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
On Thu, Aug 02, 2007 at 09:49:42PM +0800, ProAce wrote: > The size of my db is more then 50GB , so I consider that the pg_dump > is not a good backup tool for me. > And, sometimes, I need query data which is some days ago ( between 1 ~ > 14 days ). > > If I want to transfer my db to different PG version, I will use slony-I. :) > > I worried that mksnap_ffs spend much time on making a new snapshot. > I don't know whether PG work very well during the period of making snapshot. > Or the snapshot be made successfully when the PG execute / commit sql > statments continuously. If you're worried then just use PITR with a more conventional copy mechanism. You don't have to use snapshots. -- Decibel!, aka Jim Nasby decibel@decibel.org EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)