conf/102595: add {daily|weekly|monthly} snapshot creation to
/etc/periodic/*
Wolfgang Lausenbart
u at netbeisser.de
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
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 28 08:20:17 GMT 2006
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:
More information about the freebsd-bugs
mailing list