Date: Mon, 06 Jun 2011 20:06:06 +0100 From: a.smith@ukgrid.net To: freebsd-fs@freebsd.org Subject: RE: zfs snapshot management Message-ID: <20110606200606.137964cbuj8m1b40@webmail2.ukgrid.net>
next in thread | raw e-mail | index | archive | help
Hi Charles, I have written some Bash scripts that manage my snapshots via crontab and can also replicate the snapshots to a remote server via Ssh. The scripts do: *Run snapshot, (can be once a day, once an hour etc to meet system requirements). Snapshot type is weekly if run at 00h on Sunday, Monthly if run at 00h on the first of the monthly, otherwise is "regular" snapshot. *Regular snapshots are deleted after X weeks (X configurable as command argument) *Weekly snapshots are deleted after 1 year *Monthly snapshots are never automatically removed *Weekly and Monthly snapshots are optional, ie used if defined by command arguments. *If replication is used data is sent via Ssh, either directly piped into zfs receive or sent as a file which can be read in via another script at a later date (useful if you are paranoid and want the secondary ZFS to be some hours behind the primary). *Data is sent via non-root user for security. User must be given the relevant ZFS privileges. *Snapshots are pruned on both source and destination servers. I haven't published the scripts as I haven't put all the polish onto them that I think they would need. But they work as described above and are reliable, I can pass you a copy if they are of interest, cheer Andy.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110606200606.137964cbuj8m1b40>