View Full Version : Amanda exclude files not readable, so not excluding items...

Andrew Rakowski
March 1st, 2007, 03:29 PM
I have a Linux system where the user has mounted an extra hard drive on a mount point within his home directory. Unfortunately, that home directory has mode bits restricting it to the user's UID only. Since backups are running as root, that's not a problem for backing up the filesystem, since Amanda uses /usr/lib/amanda/runtar which is setuid to root, and tar can read the whole filesystem.

The problem is that the exclude file that I've set in the root of that filesystem is NOT able to be read by the "amandabackup" user, and therefore, the tar backup is backing up way more than we desire.

My dumptype has:

-sh-3.00$ grep "exclude list" ../XXXXcommon/XXXXdumptypes.conf
exclude list "/etc/amanda/exclude-list"
exclude list optional append ".amanda.excludes"

and the client in question has directories:

root@pump 43# ll -d /home/d3m628 /home/d3m628/diskb
drwx------ 50 d3m628 d3m628 4096 Mar 1 12:41 /home/d3m628
drwxrwxrwx 7 root root 4096 Feb 23 10:51 /home/d3m628/diskb
root@pump 44#

The backups spit out

sendsize[2761]: time 30.740: calculating for amname /home/d3m628/diskb, dirname /home/d3m628/diskb, spindle -1
sendsize[2761]: time 30.740: getting size via gnutar for /home/d3m628/diskb level 0
sendsize[2761]: Can't open exclude file /home/d3m628/diskb/.amanda.excludes (Permission denied)
sendsize[2761]: time 30.742: spawning /usr/lib/amanda/runtar in pipeline
sendsize[2761]: argument list: runtar XXXXset1 /bin/tar --create --file /dev/null --directory /home/d3m628/diskb --one-file-system --listed-incremental /var/lib/amanda/gnutar-lists/pump_home_d3m628_diskb_0.new --sparse --ignore-failed-read --totals --exclude-from /tmp/amanda/sendsize._home_d3m628_diskb.20070301014417.exclude .
sendsize[2761]: time 32.021: Total bytes written: 111969331200 (104GB, 104GB/s)
sendsize[2761]: time 32.021: .....
sendsize[2761]: estimate time for /home/d3m628/diskb level 0: 1.278
sendsize[2761]: estimate size for /home/d3m628/diskb level 0: 109345050 KB
sendsize[2761]: time 32.021: waiting for runtar "/home/d3m628/diskb" child
sendsize[2761]: time 32.021: after runtar /home/d3m628/diskb wait
sendsize[2761]: time 32.021: getting size via gnutar for /home/d3m628/diskb level 1
sendsize[2761]: Can't open exclude file /home/d3m628/diskb/.amanda.excludes (Permission denied)
sendsize[2761]: time 32.023: spawning /usr/lib/amanda/runtar in pipeline

Notice the "permission denied" error when it tries to open the exclude file.

I would like to suggest that the portion of sendsize that is looking for the exclude files also needs to run as root to allow the exclude lists to be built correctly. At the moment, I'm backing up perhaps 90GB of so of unneeded filesystem space.

While I can add this to the /etc/amanda/exclude-list that I also have defined, it seems that Amanda needs to be able to look at the filesystems it's backing up using the same view (root) as the actual backup.

Best regards,


March 2nd, 2007, 09:37 AM
Thanks Andrew. We are aware of the fact the Amanda may not have sufficient privileges
to read exclude files. We will have fix for this problem as part of Application API (http://wiki.zmanda.com/index.php/Application_API).