On Tue, 2 Jun 2009, Pieter Wuille wrote: > Hello, > > because of a need to restore files from backuppc in a more flexible way than > through the web-interface (a particular directory in a whole bunch of hosts > at the same time) and some googling, i stumbled upon Stephen Day's fuse system > for backuppc. > > It had a few shortcomings, such as not supporting share-names with "/" > characters, and being very slow, so i started rewriting parts and adding > some features. > > If anyone's interested at trying/looking at it: > https://svn.ulyssis.org/repos/sipa/backuppc-fuse/backuppcfs.pl > > Some features: > - caches the directory structure to improve efficiency > - supports chardevs and blockdevs (and files/dirs/symlinks) > - correct linkcounts for directories > - merges all shares of a host into one directory tree structure, > supporting '/' and '\' as separators in sharenames > - open()ed filehandles are kept and reused to prevent seeking for each and > every read operation - even supports efficient (sequential) reading when > files are opened more than once at the same time. > - incremental backups are shown correctly > - some command-line options > > 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.
Hi Peter, In the off chance that you're still using this terribly useful code - do you have any idea why it might have started failing in debian wheezy? I get a directory listing of the hosts in /snapshot just fine, but as soon as I try to get a directory listing within a host, it fails: > l /snapshots/dirachome ls: cannot access /snapshots/dirachome/892: Software caused connection abort ls: cannot access /snapshots/dirachome/2012-12-14 04:00:14: Transport endpoint is not connected ls: cannot access /snapshots/dirachome/1428: Transport endpoint is not connected ls: cannot access /snapshots/dirachome/1410: Transport endpoint is not connected ls: cannot access /snapshots/dirachome/2013-05-31 02:00:16: Transport endpoint is not connect With the following patch, I get the output: diff -u -b -r1.1 backuppcfs.pl --- backuppcfs.pl 19 Feb 2012 07:31:04 -0000 1.1 +++ backuppcfs.pl 4 Jun 2013 08:53:32 -0000 @@ -54,6 +54,8 @@ use strict; +use Carp; +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; use Fuse; use Fcntl ':mode'; use POSIX qw/EROFS EOPNOTSUPP ENOENT EINVAL setsid strftime/; @@ -510,6 +512,7 @@ my ($path) = @_; my ($sub,$attr) = get_data($path); return -ENOENT() if (!defined $attr); + print "attr -> $attr, ",join (",", @{$attr}),"\n"; return (@{$attr}); } @@ -724,7 +727,7 @@ mountopts => join(',',keys %fuseopts), mountpoint => $MOUNTPOINT, threaded => 0, - debug => 0, + debug => 1, # supported operations open=> \&bpc_open, backuppc@fs:/backuppc$ ~tconnors/bin/backuppcfs.pl -f -o ro,allow_other /snapshots/ FUSE library version: 2.9.0 nullpath_ok: 0 nopath: 0 utime_omit_ok: 0 unique: 1, opcode: INIT (26), nodeid: 0, insize: 56, pid: 0 INIT: 7.17 flags=0x0000047b max_readahead=0x00020000 INIT: 7.18 flags=0x00000011 max_readahead=0x00020000 max_write=0x00020000 max_background=0 congestion_threshold=0 unique: 1, success, outsize: 40 unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 4935 getattr / attr -> ARRAY(0x223a390), 0,1,16877,20,130,130,0,1024,0,0,0,512,2 unique: 2, success, outsize: 120 unique: 3, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 4959 getattr / attr -> ARRAY(0x223a390), 0,1,16877,20,130,130,0,1024,0,0,0,512,2 unique: 3, success, outsize: 120 unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 50, pid: 4959 LOOKUP /dirachome getattr /dirachome attr -> ARRAY(0x2abcfe0), 0,1,16877,79,130,130,0,1024,0,0,0,512,2 NODEID: 2 unique: 4, success, outsize: 144 unique: 5, opcode: GETXATTR (22), nodeid: 2, insize: 65, pid: 4959 getxattr /dirachome security.selinux 255 unique: 5, error: -95 (Operation not supported), outsize: 16 unique: 6, opcode: GETXATTR (22), nodeid: 2, insize: 72, pid: 4959 getxattr /dirachome system.posix_acl_access 0 unique: 6, error: -95 (Operation not supported), outsize: 16 unique: 7, opcode: OPENDIR (27), nodeid: 2, insize: 48, pid: 4959 unique: 7, success, outsize: 32 unique: 8, opcode: READDIR (28), nodeid: 2, insize: 80, pid: 4959 getdir[0] unique: 8, success, outsize: 4112 unique: 9, opcode: GETATTR (3), nodeid: 2, insize: 56, pid: 4959 getattr /dirachome attr -> ARRAY(0x2abcfe0), 0,1,16877,79,130,130,0,1024,0,0,0,512,2 unique: 9, success, outsize: 120 unique: 10, opcode: LOOKUP (1), nodeid: 2, insize: 44, pid: 4959 LOOKUP /dirachome/892 getattr /dirachome/892 attr -> ARRAY(0x2ac40f0), 0,1,16877,3,130,130,0,1024,1333206059,1333206059,1333206059,512,2 Invalid data type passed at /usr/lib/perl5/Fuse.pm line 130. at /home/tconnors/bin/backuppcfs.pl line 58 main::__ANON__('Invalid data type passed at /usr/lib/perl5/Fuse.pm line 130.\x{a}') called at /usr/lib/perl5/Fuse.pm line 130 Fuse::main('mountopts', 'ro,default_permissions,allow_other', 'mountpoint', '/snapshots', 'threaded', 0, 'debug', 1, 'open', ...) called at /home/tconnors/bin/backuppcfs.pl line 726 And then I go beyond my depth :( -- Tim Connors ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/