{"id":127,"date":"2008-11-10T13:13:26","date_gmt":"2008-11-10T13:13:26","guid":{"rendered":"https:\/\/www.bishnet.net\/tim\/blog\/?p=127"},"modified":"2010-11-11T13:01:41","modified_gmt":"2010-11-11T13:01:41","slug":"freebsd-filesystem-snapshots","status":"publish","type":"post","link":"https:\/\/www.bishnet.net\/tim\/blog\/2008\/11\/10\/freebsd-filesystem-snapshots\/","title":{"rendered":"FreeBSD filesystem snapshots"},"content":{"rendered":"<p>I&#8217;ve been looking at <a href=\"http:\/\/www.freebsd.org\/doc\/en_US.ISO8859-1\/books\/handbook\/snapshots.html\">filesystem snapshots<\/a> on FreeBSD lately and I have to say I wasn&#8217;t too impressed. Yes, the functionality is there, but the interface sucks. For UFS you have to create a snapshot, which takes a while, and which appears as a file within the filesystem you&#8217;re snapshotting. Then you have to use an md device to mount it. ZFS is easier, but different. What we need is a simple and standard interface to both.<\/p>\n<p>Fortunately I discovered Ralf Engelschall&#8217;s <a href=\"http:\/\/people.freebsd.org\/~rse\/snapshot\/\">snapshot management utilities<\/a>. He&#8217;s written a couple of tools that make creating and managing snapshots really easy.<\/p>\n<p>Using cron one can schedule creation of hourly, daily and weekly snapshots for filesystems. You can specify that you want 3 hourly snapshots, 2 daily and 1 weekly for a given filesystem. The system takes care of everything else. And by using amd (the FreeBSD automounter) these snapshots can automatically be made available through a given mount point. It couldn&#8217;t get any easier!<\/p>\n<p>Well, actually, it could get slightly easier. Currently these tools are available from Ralf&#8217;s site or from the <a href=\"http:\/\/www.freshports.org\/sysutils\/freebsd-snapshot\/\">FreeBSD ports collection<\/a>. It strikes me that something as useful and fundamental as this should really make its way in to the base system.<\/p>\n<p><strong>Update:<\/strong> Whilst this worked well in testing, once I applied it to my server with a large (approx, but not over, 2TB) filesystem it hung the machine completely, even on the console. I haven&#8217;t investigated further yet.<\/p>\n<p><strong>Update 2:<\/strong> Well, I have to say I&#8217;m disappointed. Ralf&#8217;s scripts worked great, but the snapshotting of large UFS filesystems in FreeBSD is as good as broken. When it takes hours to create a snapshot, locking out the filesystem (<a href=\"http:\/\/www.freebsd.org\/cgi\/query-pr.cgi?pr=128832\">and maybe even the machine<\/a>) for hours, it might as well not be there. There seems to be an attitude of &#8220;just accept it&#8221;, which I&#8217;m not impressed about either. Roll on ZFS&#8230; (yes &#8211; I know it&#8217;s there now, but I&#8217;d like it to mature just a little more \ud83d\ude42 ).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Being able to take snapshots of a filesystem is very handy for backups, but does it actually work on FreeBSD?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[140,40,41,42],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-computing","category-freebsd","tag-freebsd","tag-snapshot","tag-ufs","tag-zfs"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":9,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/127\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}