BackupPC-users

Re: [BackupPC-users] Another BackupPC Fuse filesystem

2009-06-03 08:14:51
Subject: Re: [BackupPC-users] Another BackupPC Fuse filesystem
From: Pieter Wuille <sipa AT users.sourceforge DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 3 Jun 2009 14:09:45 +0200
On Tue, Jun 02, 2009 at 04:17:18PM -0400, Jeffrey J. Kosowsky wrote:
> Pieter Wuille wrote at about 21:40:46 +0200 on Tuesday, June 2, 2009:
>  > On Tue, Jun 02, 2009 at 12:31:54PM -0400, Jeffrey J. Kosowsky wrote:
>  > > Pieter Wuille wrote at about 17:57:06 +0200 on Tuesday, June 2, 2009:
>  > <cut>
>  > >  > If anyone's interested at trying/looking at it:
>  > >  > https://svn.ulyssis.org/repos/sipa/backuppc-fuse/backuppcfs.pl
>  > >  > 
>  > <cut>
>  > >  > It is only tested on one 3.1 backuppc pool on a Ubuntu 8.04 system, 
> and not
>  > >  > very extensively. It only opens files/directories in read-only mode, 
> thus
>  > >  > shouldn't be able to damage a working backuppc pool if something goes 
> wrong.
>  > >  > 
>  > >  > I'd like to get some feedback; ideas, bugreports, ... are very 
> welcome.
>  > > 
>  > > Just took a quick spin on it -- looks AWESOME!
>  > > In my mind this is the way to go and *much* more useful and infinitely
>  > > faster than trying to navigate the web interface. This gives me
>  > > *exactly* what I want which is rapid access to all my backup files in
>  > > a CLI format that allows me to apply common *nix utilities like 'cp', 
> 'less'
>  > > 'grep', 'diff' etc. to examine and manipulate different backup
>  > > versions.
>  > Thanks :)
>  > 
>  > > Couple of questions/comments:
>  > > 1. Is there anyway to get the root share directory to mount as '/'
>  > >    rather than as '_/"? Having root mount differently detracts a
>  > >    little from the naturalness of it all.
>  > 
>  > It shouldn't be too hard to change that. The only problem is what to do 
> when
>  > you have a '/' share and a '/etc' share, and he '/' share contains a 'etc'
>  > dir/file/.... probably won't occur, and i agree it's a more natural way.
> 
> You could always add a flag that would add an (arbitrary) base name to
> the root share if needed.
Updated version online - it tries to merge virtual share-directories with the
backup content of the parent directory if possible (recursively - eg. if
you have a / and a /usr/local in separate shares it should still work, adding
a merged /usr in the process). Otherwise it will try adding _ or _<num> to
create unique filenames.

>  > > 2. What happens when a new backup is run while the fusefs is mounted?
>  > >    Is there an easy way to get the new backup to appear automagically
>  > >    or do you need to unmount/remount?
>  > Refreshing of nodes in the directory cache occurs when:
>  > - an expire happens (depending on where in the filesystem, the TTL is
>  >   either 80000s, 40000s or 1000000s (see the source code))
>  > - there's a request for something inexisting. eg. if a new backup #35
>  >   is created while the cache only has backups up to #34, and you'd do a
>  >   "cd 35" even though "ls" does not show a dir '35', it should work
>  >   (and the 35 should exist afterwards in the listing too) - untested though
> Would a refresh of the parent node catch a newly created backup before
> the timeout?
Yes. A refresh is a refresh - whether it is caused by a cache that expired or
by requesting something non-existing. So if you do a "cd 35" in the above
example case while the cache is not yet expired, the host-dir-node will be
refreshed on the fly, the cd will succeed, and the '35' directory will show
up in listings afterwards.

>  > > 3. What happens when a backup is expired or deleted while the fusefs
>  > >    is mounted?
>  > Completely untested... i assume a lot of errors might occur when you try to
>  > read files - maybe empty files, crashes, ...
>  > Errors don't propagate upwards in the tree, so only a refresh of the parent
>  > node in the tree would fix it - so either an expire or the request of 
> something
>  > inexisting.
> 
> Probably should be tested at some point... and then behaviors adjusted
> to minimize the nastiness of and maximize the recovery from any
> resulting errors.
I did some marginal testing and fixed a couple of bugs. You may temporarily
get strange results in such a case (eg. files that show up in listings but
give a "no such file or directory" when trying to view them), but no crash.

-- 
Pieter

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>