From owner-freebsd-fs@FreeBSD.ORG Wed Apr 12 13:40:56 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.ORG Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A77116A404 for ; Wed, 12 Apr 2006 13:40:56 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3527F43D7B for ; Wed, 12 Apr 2006 13:40:49 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (zmjktu@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k3CDehJ3087110 for ; Wed, 12 Apr 2006 15:40:49 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k3CDehYV087109; Wed, 12 Apr 2006 15:40:43 +0200 (CEST) (envelope-from olli) Date: Wed, 12 Apr 2006 15:40:43 +0200 (CEST) Message-Id: <200604121340.k3CDehYV087109@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG In-Reply-To: <443AFB03.6060301@samsco.org> X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 12 Apr 2006 15:40:49 +0200 (CEST) Cc: Subject: Re: How a file is deleted in ufs2? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2006 13:40:56 -0000 Scott Long wrote: > [...] IOW, there is no easy way to undelete a file. This isn't directly related to the question, but snapshots are very handy to "undelete" files. Just set up a cronjob that creates (and rotates) hourly and daily snapshots. When a user accidentally deletes a file, he can just copy it back from the latest snapshot where the file still exists. The best thing is that no admin intervention is required, no backup media have to be shuffled etc. [*] You could even make an "undelete" alias (or script) which copies files back from the snapshot. (I've seen setups where the admins replaced rm(1) with a script that moved the files to a "wastebasket" directory, which appeared to me as a gross hack. Using snapshots as described above is a much better solution and more efficient.) Best regards Oliver [*] Of course, it doesn't replace a real backup (if you lose the disk, you lose all data including all snapshots). -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "FreeBSD is Yoda, Linux is Luke Skywalker" -- Daniel C. Sobral