From nobody@FreeBSD.org  Mon Aug 28 08:15:59 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A709F16A4F1
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Aug 2006 08:15:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 6299343D8B
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Aug 2006 08:15:59 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k7S8Fxwo043177
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Aug 2006 08:15:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k7S8Fwml043171;
	Mon, 28 Aug 2006 08:15:59 GMT
	(envelope-from nobody)
Message-Id: <200608280815.k7S8Fwml043171@www.freebsd.org>
Date: Mon, 28 Aug 2006 08:15:59 GMT
From: Wolfgang Lausenbart <u@netbeisser.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: add {daily|weekly|monthly} snapshot creation to /etc/periodic/*
X-Send-Pr-Version: www-2.3

>Number:         102595
>Category:       conf
>Synopsis:       add {daily|weekly|monthly} snapshot creation to /etc/periodic/*
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 28 08:20:17 GMT 2006
>Closed-Date:    Tue Apr 24 03:38:34 GMT 2007
>Last-Modified:  Tue Apr 24 03:38:34 GMT 2007
>Originator:     Wolfgang Lausenbart
>Release:        6.1-RELEASE
>Organization:
netbeisser.de
>Environment:
FreeBSD tc3.netbeisser.local 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Tue Jun  6 05:42:59 UTC 2006 root@tc3.netbeisser.local:/usr/obj/home/src/sys/TC3 i386

>Description:
Well, I missed a way to let the System do snapshots 
in an automated way.

I try to add snapshots to /etc/periodic/daily/311.snapshots.
(I have no clue if one needs to order a number)

At current state I ask if it is a good a Idea to build
*daily* snapshots of a partition. According to some backup
strategies, I would say no.

(Well, some time ago, I submitted some simpler stuff for
security reasons, and It looks like no-one cares. :/

http://www.freebsd.org/cgi/query-pr.cgi?pr=82823

I conformed myself with the Idea that this patch simply
did not fit into the philosophy of freebsd. Maybe it is
a kind of freedom not to configure the Base System.)

>How-To-Repeat:
man mksnap_ffs

/.snap
/usr/.snap
/home/.snap

Watch empty .snap directories.
Watching at the .plan9 machine :)
>Fix:
First raw stuff that works for me:

case "$daily_snapshots_enable" in
    [Yy][Ee][Ss])
        echo ""
        echo "Doing daily snapshot:"
        enabled_snaps="/ /usr /home /nonexistant /var"
        date="$(date +%Y-%m-%d.%H_%M)"
        for s in $enabled_snaps; do
               if ! test -d $s/.snap ; then
                    echo "failed chdir() to $s";
                     else
                         cd $s/.snap;
                         mksnap_ffs $s `basename $s`-$date; cd /;
                  fi;
               done || rc=3
        echo done. || rc=3
        echo ""
        echo "Listing current snapshots:"
        snapinfo -a -v; ;;

    *)  rc=0;;
esac

exit $rc

>Release-Note:
>Audit-Trail:

From: Nick Barkas <snb@threerings.net>
To: bug-followup@FreeBSD.org,
 u@netbeisser.de
Cc:  
Subject: Re: conf/102595: add {daily|weekly|monthly} snapshot creation to /etc/periodic/*
Date: Thu, 30 Nov 2006 20:42:06 -0800

 Have you seen the sysutils/freebsd-snapshot port? It helps you set up  
 automatic hourly/daily/weekly filesystem snapshots, and even helps  
 set up amd to auto mount them on demand.
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Apr 24 03:37:46 UTC 2007 
State-Changed-Why:  
A followup notes that this can be accomplished by installing a port from 
the Ports Collection. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102595 
>Unformatted:
