Re: [Bacula-users] bacula-fd on windows 7 not listening on IPv6 address??

2011-03-12 Thread Gavin McCullagh
Hi,

On Fri, 11 Mar 2011, Joseph L. Casale wrote:

 The bacula-fd daemon (according to netstat -na) doesn't appear to be
 listening on the IPv6 address.
 
 Force it to listen on whatever address/port you desire w/ FDAddresses = 
 
 http://www.bacula.org/5.0.x-manuals/en/main/main/Client_File_daemon_Configur.html

Thanks for the reply.  Is this considered a bug?  Admittedly not so many
networks use IPv6 yet so I can imagine it might not be very high priority.

Hard coding the IP is not an ideal solution.  This is a laptop running DHCP
without a reservation so while the IPv6 address probably won't change, the
v4 address will.  I can give this laptop a reservation, but we're heading
in the direction of setting up bacula backups for 20-30 laptops, so I'd
prefer not to give them all reservations.

Gavin


-- 
Gavin McCullagh
Senior System Administrator
IT Services
Griffith College 
South Circular Road
Dublin 8
Ireland
Tel: +353 1 4163365
http://www.gcd.ie
http://www.gcd.ie/brochure.pdf
http://www.gcd.ie/opendays
http://www.gcd.ie/ebrochure

This E-mail is from Griffith College.
The E-mail and any files transmitted with it are confidential and may be
privileged and are intended solely for the use of the individual or entity
to whom they are addressed. If you are not the addressee you are prohibited
from disclosing its content, copying it or distributing it otherwise than to
the addressee. If you have received this e-mail in error, please immediately
notify the sender by replying to this e-mail and delete the e-mail from your
computer.

Bellerophon Ltd, trades as Griffith College (registered in Ireland No.
60469) with its registered address as Griffith College Campus, South
Circular Road, Dublin 8, Ireland.


--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula-fd on windows 7 not listening on IPv6 address??

2011-03-12 Thread Joseph L. Casale
Thanks for the reply.  Is this considered a bug?  Admittedly not so many
networks use IPv6 yet so I can imagine it might not be very high priority.

Hard coding the IP is not an ideal solution.  This is a laptop running DHCP
without a reservation so while the IPv6 address probably won't change, the
v4 address will.  I can give this laptop a reservation, but we're heading
in the direction of setting up bacula backups for 20-30 laptops, so I'd
prefer not to give them all reservations.

Well, I don't know about bug, but the manual suggests an algorithm based
on the routing table.

I don't have any v6 nets available (so I can't test), and the manual suggests
that or as a symbolic name (only in the ip specification) so it looks as if 
this
would not work (unless I am only being pedantic about ip versus ipv#):

FDAddresses  = { 
ipv6 = {
addr = host.domain.com;
port = 9102;
}

You can try it though as I took a look through the source in trunk and there
doesn't appear to be a distinction at least in the code between any of the
address parameters and the manual only notes the limitation in FDAddresses
not FDAddress. My guess is it that it will be fine.
jlc

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] file listing?

2011-03-12 Thread ganiuszka
Hi,

I wrote the Bacula LStat decoder implementation in PHP. I made WebGUI
for this also. Now online LStat decoder (beta version) is available on
my page Bacula.pl:

http://www.bacula.pl/bacula-lstat-decoder/

In the near future I need to make description of fields.

Here is Bacula LStat decoder function in PHP:

function decode_bacula_lstat($lstat) {
$base64 = 
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
$lstat = trim($lstat);
$lstat_fields = explode(' ', $lstat);

if(count($lstat_fields) !== 16) {
die('Error! Number of lstat fields is invalid. Please make sure 
that
it is valid lstat string.');
}

list($dev, $inode, $mode, $links, $uid, $gid, $rdev, $size, $blksize,
$blocks, $atime, $mtime, $ctime, $linkfi, $flags, $data) =
$lstat_fields;
$encoded_values = array('dev' = $dev, 'inode' = $inode, 'mode' =
$mode, 'links' = $links, 'uid' = $uid, 'gid' = $gid, 'rdev' =
$rdev, 'size' = $size, 'blksize' = $blksize, 'blocks' = $blocks,
'atime' = $atime, 'mtime' = $mtime, 'ctime' = $ctime, 'linkfi' =
$linkfi, 'flags' = $flags, 'data' = $data);

$ret = array();
foreach($encoded_values as $key = $val) {
$result = 0;
$is_minus = false;
$start = 0;

if(substr($val, 0, 1) === '-') {
$is_minus = true;
$start++;
}

for($i = $start; $i  strlen($val); $i++) {
$result = 6;
$result +=  strpos($base64, substr($val, $i , 1));
}
$ret[$key] = ($is_minus === true) ? -$result : $result;
}
return $ret;
}

and here is usage for this:

$lstat = 'gB DL+b IGg B A y A D5dZR BAA fN4 BNeR+z BNeR+7 BNeR+7 A A C';
$decoded_lstat = decode_bacula_lstat($lstat);
print_r($decoded_lstat);

Any suggestions and modifications are welcome.
Regards
gani


W dniu 11 marca 2011 21:45 użytkownik ganiuszka ganius...@gmail.com napisał:
 Hi,
 In my example jobid is putting in:
 ... File.JobId=8...
 but this eight:

 base64_decode_lstat(8,File.LStat)

 is exactly eight field (encoded filesize field). I seem that you used
 standard base64 decoder to decode eighth field. Am I right?

 Bacula lstat is encoded by using non-standard base64 algorithm. Your
 decoded lstat shows like this:

 [dev] = 89
 [inodes] = 1366434
 [mode] = 33200
 [links] = 1
 [uid] = 80
 [gid] = 91
 [rdev] = 5481898
 [size] = 315
 [blksize] = 16384
 [blocks] = 4
 [atime] = 1299770037
 [mtime] = 1299770037
 [ctime] = 1299770066
 [LinkFl] = 0
 [flags] = 0
 [data] = 2

 I do not understand every field, but most fields is clear. Now, I
 wrote implementation of Bacula base64_decoder in PHP. I need finish it
 and make WebGUI for this and I will share this decoder here. For this
 I am using source code of base64 implementation in Bacula and this:

 http://old.nabble.com/The-File.LStat-field-td940366.html

 Regards.
 gani

 2011/3/11 Dan Langille d...@langille.org:
 On 3/9/2011 5:36 PM, ganiuszka wrote:

 2011/3/9 Mike Egglestonmikee...@mac.com:

 Afternoon,

 I just noticed one of my clients had a huge incremental (level 2)
 backup. I want to see what file caused the huge increase. I tried 'list
 files jobid=20097' and though I'm shown the files, I'm not shown the
 size of each file. Is there a command or query that shows me the size
 of the file?

 Mike

 Hi,
 Here you have SQL function for PostgreSQL (I took it from bweb):

 CREATE PROCEDURAL LANGUAGE plpgsql;
 BEGIN;

 CREATE OR REPLACE FUNCTION base64_decode_lstat(int4, varchar) RETURNS int8
 AS $$
 DECLARE
 val int8;
 b64 varchar(64);
 size varchar(64);
 i int;
 BEGIN
 size := split_part($2, ' ', $1);
 b64 := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
 val := 0;
 FOR i IN 1..length(size) LOOP
 val := val + (strpos(b64, substr(size, i, 1))-1) * (64^(length(size)-i));
 END LOOP;
 RETURN val;
 END;
 $$ language 'plpgsql';

 COMMIT;

 and this is a query which lists file path, filename and size in Bytes
 (in this example for jobid=8):

 SELECT Path.Path, Filename.Name, base64_decode_lstat(8,File.LStat) AS
 size FROM Filename, File, Path WHERE File.JobId=8 AND
 File.PathId=Path.PathId AND Filename.FilenameId=File.FilenameId ORDER
 BY size ASC;

 I tested it. It works.

 For the record:

 In this query, I see base64_decode_lstat(8,File.LStat)

 What is 8?  It is not jobid.  It is a field id.  This lstat value:

 BZ FNmi IGw B BQ Bb U6Wq E7 EAA E BNeOq1 BNeOq1 BNeOrS A A C

 The eight field, as defined by ' ', is E7.

 --
 Dan Langille - http://langille.org/




-- 
Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich. Jezus Chrystus

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the 

[Bacula-users] ERROR in authenticate.c:304 UA Hello from client:127.0.0.1:3

2011-03-12 Thread Raczka
Hello everyone!

Bacula (currently 5.0.3) is running in my enviroment under FreeBSD for about 
year without problems.
Two days ago daemon started sending message as below (every 5minutes):

date bckserver1: ERROR in authenticate.c:304 UA Hello from 
client:127.0.0.1:36131 is invalid. Len=0

Misconfiguration should not be a reason - i've disconnected recently added 
clients / polls /etc. even though they were connected much earlier than problem 
occured. Backups are running OK despite this.

Does anyone have idea how to diagnose/fix this issue? Receiving almost 
300msgs/24h via mail really annoying ;-)

+--
|This was sent by adam.rac...@networkpartners.pl via Backup Central.
|Forward SPAM to ab...@backupcentral.com.
+--



--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] file listing?

2011-03-12 Thread Dan Langille
On 3/12/2011 9:29 AM, ganiuszka wrote:
 W dniu 11 marca 2011 21:45 użytkownik ganiuszkaganius...@gmail.com  napisał:
 Hi,
 In my example jobid is putting in:
 ... File.JobId=8...
 but this eight:

 base64_decode_lstat(8,File.LStat)

 is exactly eight field (encoded filesize field). I seem that you used
 standard base64 decoder to decode eighth field. Am I right?

 Bacula lstat is encoded by using non-standard base64 algorithm. Your
 decoded lstat shows like this:

 [dev] =  89
 [inodes] =  1366434
 [mode] =  33200
 [links] =  1
 [uid] =  80
 [gid] =  91
 [rdev] =  5481898
 [size] =  315
 [blksize] =  16384
 [blocks] =  4
 [atime] =  1299770037
 [mtime] =  1299770037
 [ctime] =  1299770066
 [LinkFl] =  0
 [flags] =  0
 [data] =  2

 I do not understand every field, but most fields is clear. Now, I
 wrote implementation of Bacula base64_decoder in PHP. I need finish it
 and make WebGUI for this and I will share this decoder here. For this
 I am using source code of base64 implementation in Bacula and this:

 http://old.nabble.com/The-File.LStat-field-td940366.html

 Regards.
 gani

 2011/3/11 Dan Langilled...@langille.org:
 On 3/9/2011 5:36 PM, ganiuszka wrote:

 2011/3/9 Mike Egglestonmikee...@mac.com:

 Afternoon,

 I just noticed one of my clients had a huge incremental (level 2)
 backup. I want to see what file caused the huge increase. I tried 'list
 files jobid=20097' and though I'm shown the files, I'm not shown the
 size of each file. Is there a command or query that shows me the size
 of the file?

 Mike

 Hi,
 Here you have SQL function for PostgreSQL (I took it from bweb):

 CREATE PROCEDURAL LANGUAGE plpgsql;
 BEGIN;

 CREATE OR REPLACE FUNCTION base64_decode_lstat(int4, varchar) RETURNS int8
 AS $$
 DECLARE
 val int8;
 b64 varchar(64);
 size varchar(64);
 i int;
 BEGIN
 size := split_part($2, ' ', $1);
 b64 := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
 val := 0;
 FOR i IN 1..length(size) LOOP
 val := val + (strpos(b64, substr(size, i, 1))-1) * (64^(length(size)-i));
 END LOOP;
 RETURN val;
 END;
 $$ language 'plpgsql';

 COMMIT;

 and this is a query which lists file path, filename and size in Bytes
 (in this example for jobid=8):

 SELECT Path.Path, Filename.Name, base64_decode_lstat(8,File.LStat) AS
 size FROM Filename, File, Path WHERE File.JobId=8 AND
 File.PathId=Path.PathId AND Filename.FilenameId=File.FilenameId ORDER
 BY size ASC;

 I tested it. It works.

 For the record:

 In this query, I see base64_decode_lstat(8,File.LStat)

 What is 8?  It is not jobid.  It is a field id.  This lstat value:

 BZ FNmi IGw B BQ Bb U6Wq E7 EAA E BNeOq1 BNeOq1 BNeOrS A A C

 The eight field, as defined by ' ', is E7.

 --
 Dan Langille - http://langille.org/






 Hi,

 I wrote the Bacula LStat decoder implementation in PHP. I made WebGUI
 for this also. Now online LStat decoder (beta version) is available on
 my page Bacula.pl:

 http://www.bacula.pl/bacula-lstat-decoder/

 In the near future I need to make description of fields.

 Here is Bacula LStat decoder function in PHP:

 function decode_bacula_lstat($lstat) {
   $base64 = 
 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
   $lstat = trim($lstat);
   $lstat_fields = explode(' ', $lstat);

   if(count($lstat_fields) !== 16) {
   die('Error! Number of lstat fields is invalid. Please make sure 
 that
 it is valid lstat string.');
   }

   list($dev, $inode, $mode, $links, $uid, $gid, $rdev, $size, $blksize,
 $blocks, $atime, $mtime, $ctime, $linkfi, $flags, $data) =
 $lstat_fields;
   $encoded_values = array('dev' = $dev, 'inode' = $inode, 'mode' =
 $mode, 'links' = $links, 'uid' = $uid, 'gid' = $gid, 'rdev' =
 $rdev, 'size' = $size, 'blksize' = $blksize, 'blocks' = $blocks,
 'atime' = $atime, 'mtime' = $mtime, 'ctime' = $ctime, 'linkfi' =
 $linkfi, 'flags' = $flags, 'data' = $data);

   $ret = array();
   foreach($encoded_values as $key = $val) {
   $result = 0;
   $is_minus = false;
   $start = 0;

   if(substr($val, 0, 1) === '-') {
   $is_minus = true;
   $start++;
   }

   for($i = $start; $i  strlen($val); $i++) {
   $result = 6;
   $result +=  strpos($base64, substr($val, $i , 1));
   }
   $ret[$key] = ($is_minus === true) ? -$result : $result;
   }
   return $ret;
 }

 and here is usage for this:

 $lstat = 'gB DL+b IGg B A y A D5dZR BAA fN4 BNeR+z BNeR+7 BNeR+7 A A C';
 $decoded_lstat = decode_bacula_lstat($lstat);
 print_r($decoded_lstat);

 Any suggestions and modifications are welcome.
 Regards
 gani


I tried this function. I got an interesting value for:

   Bn bIgF IGk B Pp Pp BsZ/o Cp7/ZH EAA VQLA BNachF BNacW5 BNachH A A C

The PHP function returns:  -1443891641

The pgsql function returns:

bacula=# select base64_decode_lstat(8,'Bn bIgF IGk B Pp Pp BsZ/o 

Re: [Bacula-users] file listing?

2011-03-12 Thread ganiuszka
Hi,

First, many thanks for your feedback.

I researched that behaviour with filesize of your lstat field (
-1443891641). Yes, I made mistake with using shift bitwise operator.
From PHP documentation:

Warning!
Don't right shift for more than 32 bits on 32 bits systems. Don't left
shift in case it results to number longer than 32 bits.
(source: http://php.net/manual/en/language.operators.bitwise.php)

Repairing this bug is replacing the line:

$result = 6;

to this line:

$result = bcmul($result, bcpow(2,6));

It should work properly.

Thanks.
gani


W dniu 13 marca 2011 01:01 użytkownik Dan Langille d...@langille.org napisał:
 On 3/12/2011 9:29 AM, ganiuszka wrote:

 W dniu 11 marca 2011 21:45 użytkownik ganiuszkaganius...@gmail.com
  napisał:

 Hi,
 In my example jobid is putting in:
 ... File.JobId=8...
 but this eight:

 base64_decode_lstat(8,File.LStat)

 is exactly eight field (encoded filesize field). I seem that you used
 standard base64 decoder to decode eighth field. Am I right?

 Bacula lstat is encoded by using non-standard base64 algorithm. Your
 decoded lstat shows like this:

 [dev] =  89
 [inodes] =  1366434
 [mode] =  33200
 [links] =  1
 [uid] =  80
 [gid] =  91
 [rdev] =  5481898
 [size] =  315
 [blksize] =  16384
 [blocks] =  4
 [atime] =  1299770037
 [mtime] =  1299770037
 [ctime] =  1299770066
 [LinkFl] =  0
 [flags] =  0
 [data] =  2

 I do not understand every field, but most fields is clear. Now, I
 wrote implementation of Bacula base64_decoder in PHP. I need finish it
 and make WebGUI for this and I will share this decoder here. For this
 I am using source code of base64 implementation in Bacula and this:

 http://old.nabble.com/The-File.LStat-field-td940366.html

 Regards.
 gani

 2011/3/11 Dan Langilled...@langille.org:

 On 3/9/2011 5:36 PM, ganiuszka wrote:

 2011/3/9 Mike Egglestonmikee...@mac.com:

 Afternoon,

 I just noticed one of my clients had a huge incremental (level 2)
 backup. I want to see what file caused the huge increase. I tried
 'list
 files jobid=20097' and though I'm shown the files, I'm not shown the
 size of each file. Is there a command or query that shows me the size
 of the file?

 Mike

 Hi,
 Here you have SQL function for PostgreSQL (I took it from bweb):

 CREATE PROCEDURAL LANGUAGE plpgsql;
 BEGIN;

 CREATE OR REPLACE FUNCTION base64_decode_lstat(int4, varchar) RETURNS
 int8
 AS $$
 DECLARE
 val int8;
 b64 varchar(64);
 size varchar(64);
 i int;
 BEGIN
 size := split_part($2, ' ', $1);
 b64 :=
 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
 val := 0;
 FOR i IN 1..length(size) LOOP
 val := val + (strpos(b64, substr(size, i, 1))-1) *
 (64^(length(size)-i));
 END LOOP;
 RETURN val;
 END;
 $$ language 'plpgsql';

 COMMIT;

 and this is a query which lists file path, filename and size in Bytes
 (in this example for jobid=8):

 SELECT Path.Path, Filename.Name, base64_decode_lstat(8,File.LStat) AS
 size FROM Filename, File, Path WHERE File.JobId=8 AND
 File.PathId=Path.PathId AND Filename.FilenameId=File.FilenameId ORDER
 BY size ASC;

 I tested it. It works.

 For the record:

 In this query, I see base64_decode_lstat(8,File.LStat)

 What is 8?  It is not jobid.  It is a field id.  This lstat value:

 BZ FNmi IGw B BQ Bb U6Wq E7 EAA E BNeOq1 BNeOq1 BNeOrS A A C

 The eight field, as defined by ' ', is E7.

 --
 Dan Langille - http://langille.org/






 Hi,

 I wrote the Bacula LStat decoder implementation in PHP. I made WebGUI
 for this also. Now online LStat decoder (beta version) is available on
 my page Bacula.pl:

 http://www.bacula.pl/bacula-lstat-decoder/

 In the near future I need to make description of fields.

 Here is Bacula LStat decoder function in PHP:

 function decode_bacula_lstat($lstat) {
        $base64 =
 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
        $lstat = trim($lstat);
        $lstat_fields = explode(' ', $lstat);

        if(count($lstat_fields) !== 16) {
                die('Error! Number of lstat fields is invalid. Please make
 sure that
 it is valid lstat string.');
        }

        list($dev, $inode, $mode, $links, $uid, $gid, $rdev, $size,
 $blksize,
 $blocks, $atime, $mtime, $ctime, $linkfi, $flags, $data) =
 $lstat_fields;
        $encoded_values = array('dev' = $dev, 'inode' = $inode, 'mode' =
 $mode, 'links' = $links, 'uid' = $uid, 'gid' = $gid, 'rdev' =
 $rdev, 'size' = $size, 'blksize' = $blksize, 'blocks' = $blocks,
 'atime' = $atime, 'mtime' = $mtime, 'ctime' = $ctime, 'linkfi' =
 $linkfi, 'flags' = $flags, 'data' = $data);

        $ret = array();
        foreach($encoded_values as $key = $val) {
                $result = 0;
                $is_minus = false;
                $start = 0;

                if(substr($val, 0, 1) === '-') {
                        $is_minus = true;
                        $start++;
                }

                for($i = $start; $i  strlen($val); $i++) {
                        $result = 6;
                        $result +=  

Re: [Bacula-users] Bacula-dir 5.01 no listen‏

2011-03-12 Thread Steen Meyer
Torsdag den 11. Marts 2010 13:49:15 skrev John Drescher:
  You can help me?

 First off remove 127.0.0.1 and local host from all bacula
 configuration files. Using either of these will prevent bacula from
 being a network backup program. Secondly start the director from the
 console

 bacula-dir -c /etc/bacula/bacula-dir.conf -d 100

I had a similar issue with 5.03 - for the record:
Bacula-dir started, but did not listen.
bacula-dir -t -c /etc/bacula/bacula-dir.conf revealed an issue with the 
database: I had to grant privileges to the database not only after database 
creation, but also after the table creation.

Then Bacula-dir started again - without listening - and with no errors in the 
logs

sudo bacula-dir -c /etc/bacula/bacula-dir.conf -d 100 
made Bacula-dir start and listen without errors.

The problem turned out to be missing permissions on the working directory:
chown -R bacula:root /var/cache/bacula
Then Bacula-dir start and listen also when started normally

Tanks for the great tip - now that Bacula itself is so sparce with information

-- 
Steen

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users