Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Sep 2004 17:18:31 +0200
From:      "Ralf S. Engelschall" <rse@FreeBSD.org>
To:        freebsd-hackers@freebsd.org
Subject:   Request for Review: UFS2 Snapshot Management Environment
Message-ID:  <20040903151831.GA84131@engelschall.com>

next in thread | raw e-mail | index | archive | help
Recently I was a little bit bored that ONTAP WAFL's .snapshot feature
is such easy to use since years while on my FreeBSD 5 boxes the
unprivileged users were not able to as easily use snapshots for
retrieving old stages of their files.

Hence I implemented a little snapshot management environment for FreeBSD
around mount(8), mdconfig(8), amd(8) and cron(8) which lets me provide a
similar environment than what people are used to from WAFL. To illustate
the solution, let's give an example:

On ONTAP WAFL filesystems users already can do:

| $ cd /home/rse
| $ echo "before" >foo.txt; sleep 3601
| $ echo "middle" >foo.txt; sleep 3601
| $ echo "after"  >foo.txt
| $ ls -la | fgrep .snapshot
| $ cat .snapshot/hourly.1/foo.txt .snapshot/hourly.0/foo.txt foo.txt
| before
| middle
| after

On FreeBSD UFS2 filesystems users now also can do:

| $ cd /home/rse
| $ echo "before" >foo.txt; sleep 3601
| $ echo "middle" >foo.txt; sleep 3601
| $ echo "after"  >foo.txt
| $ ls -la /snap | grep hourly
| $ cat /snap/home:hourly.1/rse/foo.txt /snap/home:hourly.0/rse/foo.txt foo.txt
| before
| middle
| after

Because it certainly is useful also for others, I've now packed the
stuff together, added a little Makefile for ad-hoc "make install"
and "make uninstall" and wrote both manual pages for the implemented
commands plus a little summary and background article under

  http://people.freebsd.org/~rse/snapshot/

Now, enjoy happy snapshooting!
And feel free to give me feedback, please... ;-)

Yours,
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       rse@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040903151831.GA84131>