From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 28 08:20:19 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F69416A4DE for ; Mon, 28 Aug 2006 08:20:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9EEF43D58 for ; Mon, 28 Aug 2006 08:20:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k7S8KHMp054943 for ; Mon, 28 Aug 2006 08:20:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k7S8KHPS054939; Mon, 28 Aug 2006 08:20:17 GMT (envelope-from gnats) Resent-Date: Mon, 28 Aug 2006 08:20:17 GMT Resent-Message-Id: <200608280820.k7S8KHPS054939@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Wolfgang Lausenbart Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A709F16A4F1 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: conf/102595: add {daily|weekly|monthly} snapshot creation to /etc/periodic/* X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 08:20:19 -0000 >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@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: