Bacula-users

Re: [Bacula-users] Linux: backup and restore of file capabilities ?

2012-01-02 15:43:09
Subject: Re: [Bacula-users] Linux: backup and restore of file capabilities ?
From: Wolfgang Denk <wd AT denx DOT de>
To: Marco van Wieringen <mvw AT planets.elm DOT net>
Date: Mon, 02 Jan 2012 21:40:51 +0100
Dear Marco,

In message <loom.20120102T163316-867 AT post.gmane DOT org> you wrote:
>
> > It appears that bacula does not save, and thus cannot restore, such
> > file capabilities.
> > 
> Thats not really true. I did some searching on google to find out
> how these so called POSIX file capabilities are implemented.
> Its also quite new code it went into Linux 2.6.24 in may last year or so.

Hm... v2.6.24 is four years old...  Maybe you mean v2.6.34,
and May 2010?

> Yup add acl = yes and xattr = yes to your fileset and you should
> be set to backup most of the future options. Bacula is one of

Hm... I have these settings in the FileSet definition:

  Include {
    Options {
      signature = MD5
      xattrsupport = yes
      aclsupport = yes
    }
    File = /usr/bin
  }

When restoring, the file attributes were lost anyway.

Is there any other place I need to give extra options?  When
restoring?

> the few Open Source backup products (probably the only)
> which has very broad support for all these kind of exotic
> acl's, extended attributes and extensible attributes. I had to
> write everything from scratch as no other projects address all
> know interfaces. So we are quite good in doing the exotic stuff.

Guess why I've been using bacula for so long...

And btw: thanks :-)


> We already found out that Novell uses extended attributes for
> storing additional access control lists on there NSS filesystem.
> And those also backup and restore fine with the generic xattr code.

I'm just a user of bacula, no developer of it, so I don't care much
about the implementation or the interface. As long as the
functionality is present and working I'm fine with it.

> > Note that this is probably a bigger problem - it appears that
> > neither cpio nor tar nor rsync etc. can deal with file capabilities.
> > At the moment I don't know how to create a 100% correct backup of a
> > plain vanilla Linux root filesystem...  
> > 
> If you look at the linked webpage you will see that rsync and cpio
> have support for extended attributes and that is used to copy these
> posix file capabilities.

In the linked PDF file I cannot find a reference to cpio or rsync.

But rsync does indeed work as needed when using -X.  Sorry, I missed that.

The cpio in Fedora 16 does not appear to support this.

> So I would say give the xattr=yes a go on your install and see
> if it works for these attributes. You could create a test fileset
> with a known file with a posix file capability and run the bacula-fd
> with a debug level of 100 and watch for xattr save messages.

Done that, but I could not see any.

This is with bacula as distributed with Fedora 16, most recent
updates installed:

        bacula-client-5.0.3-13.fc16.x86_64
        bacula-common-5.0.3-13.fc16.x86_64
        bacula-console-5.0.3-13.fc16.x86_64
        bacula-console-bat-5.0.3-13.fc16.x86_64
        bacula-director-common-5.0.3-13.fc16.x86_64
        bacula-director-mysql-5.0.3-13.fc16.x86_64
        bacula-docs-5.0.3-13.fc16.x86_64
        bacula-storage-common-5.0.3-13.fc16.x86_64
        bacula-storage-mysql-5.0.3-13.fc16.x86_64

Anything ales I could look for?

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd AT denx DOT de
Punishment becomes ineffective after a certain point. Men become  in-
sensitive.
        -- Eneg, "Patterns of Force", stardate 2534.7

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users