A way to recover deleted files (just contents) from USF2
Brian F. Feldman
green at freebsd.org
Tue Apr 20 08:57:39 PDT 2004
Xin LI <delphij at frontfree.net> wrote:
> On Tue, Apr 20, 2004 at 03:08:03PM +0200, Daniel Lang wrote:
> [...]
> > simple solution:
> >
> > alias rm="rm -i"
> [...]
>
> If memory serves me right, a distribution of Linux does this aliasing
> for root by default. Personally I prefer FreeBSD's approach beacuse,
> when doing this type of things, we are potentially breaking semantics
> of the original utility and hence may make errors on ther systems.
>
> A possible solution might be have a cron script that periodically
> takes snapshot of the file system (for example, one per one hour).
> While snapshot alone could be considered to be a complete backup
> solution, it is possible to save our time when recovering files
> from earlier snapshots, and it will be even possible to retrieve
> earlier versions of files. However, the overhead when taking the
> snapshots is not so neglectable (for a large file system, it will
> take several seconds for a snapshot to be taken).
>
> This approach is more similiar with Windows's recycle bin approach,
> but does not help in the download-and-rm case if there's no snapshot
> taken between download and rm.
That sounds like a cool idea. Maybe you could write a small program to do
that and an rc.d script for it? Simplest operation would be something like:
periodic_ufs_snap_enable="YES"
periodic_ufs_snap_filesystems="/home"
periodic_ufs_snap_interval="1h"
periodic_ufs_snap_amount="2"
The program would rotate snapshots every time period and delete them after
whatever rotation amount. It wouldn't have to be more than some shell
scripts that modify the system crontab if you want to do that instead of a
separate daemon. It wouldn't be useful for everyone but having a very cheap
"instant backup" would certainly be nice for those slap-your-forehead
moments.
--
Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\
<> green at FreeBSD.org \ The Power to Serve! \
Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\
More information about the freebsd-current
mailing list