Dwight Tovey wrote:
Jon LaBadie said:
On Tue, Dec 28, 2004 at 05:15:30PM -0700, Dwight Tovey wrote:
I'm looking at using Amanda for my backup solution, and I've run into a
bit of a problem that I'm hoping to get some help with.
...
If I try to use the device instead of the mountpoint, amcheck (and
eventually amdump) fails with "Can't open disk 'hda6'" for each
'include'.
Looking at the source I found that every time it encounters an
'include',
Amanda trys to do an 'opendir()' to verify the included name. Since the
device is not a directory, the opendir() fails resulting in the
displayed
error.
Yes. That's a limitation of the current implementation.
For "exclude", amanda can use the --exclude flags of gnutar
doing pattern matches. Gnutar however has no support for a
similar "include" that handles patterns. That's why amanda
had to expand the patterns herself.
Gnutar itself is run through the "runtar" executable, which is
suid-root to get all the necessary priviledges needed. But
while expanding the patterns for the "include" directive, amanda
does that herself, and, as you noticed, does not run with root
priviledges.
Ultimately, I would like gnutar to include that include-with-pattern
functionality. As alternative, we could write yet another suid-root
program that handles the pattern-expansion for the includes.
Also note that the man page states:
"All include expressions... must start with "./" and containing
no other "/".
I.e. amanda limits the expansion to one level deep only (to avoid
scanning the whole directory tree). When gnutar would do the
pattern matching of the include-directive, this limitation would
be eliminated too. Someone brave enough to submit a patch for gnutar?
So, is there any way around this short of running Amanda as 'root'? Is
there really any problem with running as root?
No real problem. This only violates the rule to do everything with
the minimum necessary priviledges needed.
--
Paul Bijnens, Xplanation Tel +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM Fax +32 16 397.512
http://www.xplanation.com/ email: Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, *
* kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************
|