conf/102595: add {daily|weekly|monthly} snapshot creation to /etc/periodic/*

Wolfgang Lausenbart u at
Mon Aug 28 08:20:19 UTC 2006

>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:          open
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 28 08:20:17 GMT 2006
>Originator:     Wolfgang Lausenbart
>Release:        6.1-RELEASE
FreeBSD tc3.netbeisser.local 6.1-RELEASE FreeBSD 6.1-RELEASE #1: Tue Jun  6 05:42:59 UTC 2006 root at tc3.netbeisser.local:/usr/obj/home/src/sys/TC3 i386

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. :/

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.)

man mksnap_ffs


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

case "$daily_snapshots_enable" in
        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";
                         cd $s/.snap;
                         mksnap_ffs $s `basename $s`-$date; cd /;
               done || rc=3
        echo done. || rc=3
        echo ""
        echo "Listing current snapshots:"
        snapinfo -a -v; ;;

    *)  rc=0;;

exit $rc


More information about the freebsd-bugs mailing list