[Box Backup-dev] Re:BoxReport.pl (was ChrisMerge_1828)

Matt Brown boxbackup-dev@fluffy.co.uk
Fri, 21 Sep 2007 22:31:24 +0100


Hi Chris,

>>> > > >  If only I get the LogAllFileAccess to output something : 
>>> ( - I > > >  did try without ExtendedLogging enabled, I then had  
>>> very little > > >  output at all....
>>> > >
>>> > > You might not have enough logging enabled in /etc/ 
>>> syslog.conf. What > > does it contain?
>>> > > local6.* /var/log/box
>>> Where in /etc/syslog.conf does this appear? When I placed it at  
>>> the end of syslog.conf I got no debugging messages. At the start,  
>>> it worked fine.
>>
>> It was at the bottom of the syslog.conf file, I have now moved it  
>> to the top and restarted - however no change :(
>
> That is very strange. I just verified that it does work for me:
>

I agree, and I think I am going slightly bald now :-)

I just tried sending some stuff to the local6.info via logger ....  
logger -p local6.info Testing syslog into /var/log/box 6

Sep 21 22:13:30 orion Box Backup (bbackupd)[3653]: NOTICE: About to  
notify administrator about event backup-start, running script '/etc/ 
box/bbackupd/NotifySysadmin.sh backup-start'
Sep 21 22:13:30 orion Box Backup[6039]: Succeeded.
Sep 21 22:13:36 orion Box Backup (bbackupd)[3653]: WARNING: Ignored  
directory: /var/lock: is a mount point; create a new location if you  
want to back it up
Sep 21 22:13:36 orion Box Backup (bbackupd)[3653]: WARNING: Ignored  
directory: /var/run: is a mount point; create a new location if you  
want to back it up
Sep 21 22:13:54 orion Box Backup (bbackupd)[3653]: NOTICE: Finished  
scan of local files
Sep 21 22:13:54 orion Box Backup (bbackupd)[3653]: NOTICE: About to  
notify administrator about event backup-finish, running script '/etc/ 
box/bbackupd/NotifySysadmin.sh backup-finish'
Sep 21 22:13:55 orion Box Backup (bbackupd)[3653]: NOTICE: File  
statistics: total file size uploaded 15315170, bytes already on  
server 15228434, encoded size 156091
Sep 21 22:20:50 orion matt: Testing syslog into /var/log/box 5
Sep 21 22:20:53 orion matt: Testing syslog into /var/log/box 6
Sep 21 22:20:56 orion matt: Testing syslog into /var/log/box 7

So it would appear I can get messages to log via local6 .. just not  
the LogAllFileAccess stuff ....

> ----
> chris@gcc(bb-merge)$ grep "Synchronised file:" /var/log/box | wc -l
> 39
>
> chris@gcc(bb-merge)$ grep "Synchronised file:" /var/log/box | head -1
> Sep 21 21:54:43 gcc Box Backup (bbackupd)[19248]: Synchronised  
> file: testfiles/TestDir1/f1.dat
>
> chris@gcc(bb-merge)$ grep "Synchronised file:" /var/log/box | tail -1
> Sep 21 21:54:43 gcc Box Backup (bbackupd)[19248]: Synchronised  
> file: testfiles/TestDir1/renamed-dir/dfsfd/a.out.h
>
> chris@gcc(bb-merge)$ grep box /etc/syslog.conf
> # http://www.fluffy.co.uk/boxbackup/server.html
> local6.*                                                -/var/log/box
> ----
>
> Could you try stracing syslogd while bbackupd is running a backup  
> (you can force this with bbackupctl force-sync) and check that it  
> receives the messages, and find out where it writes them to? lsof  
> on the syslogd process can tell you which file descriptor is which.  
> For example, on my system:
>
> ----
> chris@gcc(bbackupd)$ sudo strace -f -s 128 -e recv,writev -p 16641
> Process 16641 attached - interrupt to quit
> ...
> recv(0, "<182>Sep 21 22:02:30 Box Backup (bbackupd)[19479]:  
> Synchronised file: testfiles/TestDir1/sub23/rand.h", 1022, 0) = 101
> writev(2, [{"Sep 21 22:02:30", 15}, {" ", 1}, {"gcc", 3}, {" ", 1},  
> {"Box Backup (bbackupd)[19479]: Synchronised file: testfiles/ 
> TestDir1/sub23/rand.h", 80}, {"\n", 1}], 6) = 101
>
> chris@gcc(bbackupd)$ sudo lsof -p 16641
> ...
> syslogd 16641 root    0u  unix 0xd46ad500         48751158 /dev/log
> syslogd 16641 root    2w   REG        3,6  100148  7799094 /var/log/ 
> box
>
> chris@gcc(bb-merge)$ grep "Sep 21 22:02:30 .* Box Backup .bbackupd.. 
> 19479.: Synchronised file: testfiles/TestDir1/sub23/rand.h" /var/ 
> log/box
> Sep 21 22:02:30 gcc Box Backup (bbackupd)[19479]: Synchronised  
> file: testfiles/TestDir1/sub23/rand.h
> ----

Anyhow, I shall give the commands above a try and see what I get -  
thanks for your patience on this.

Regards

Matt