Re: [BackupPC-users] DHCP backups - only once possible

2018-11-26 Thread Jean-Marc

Thanks for 4.3.0 upgrade !


Le 30/10/2018 à 06:36, Craig Barratt via BackupPC-users a écrit :

Jean-Marc,

Do you know when 4.2.2 will be available ?


I've been reviewing the mail list over the last few months, and there 
are still a couple of reported issues I'm trying to replicate or learn 
more about.


Hopefully I get 4.2.2 out by the end of November.
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-11-01 Thread Craig Barratt via BackupPC-users
I pushed a commit

that fixes the potentially undefined $LogFd issue.

Thanks,
Craig

On Tue, Oct 30, 2018 at 8:50 AM G.W. Haywood via BackupPC-users <
backuppc-users@lists.sourceforge.net> wrote:

> Hi there,
>
> On Tue, 30 Oct 2018, Craig Barratt wrote:
>
> > I've been reviewing the mail list over the last few months, and
> > there are still a couple of reported issues I'm trying to replicate
> > or learn more about.
>
> I'm still looking at the issue I had with BackupPC a couple of months
> ago (Re: BackupPC 4.2.1 apparently in an infinite loop.) and I think
> it might have been a kernel problem.  At least after I upgraded the
> kernel - and that's the only change that I made - the problem seemed
> to go away.  Calls to select() in rsync_bpc were timing out.  Here's
> an example strace output:
>
> select(4, [3], [], NULL, {tv_sec=5, tv_usec=41543}) = 0 (Timeout)
> select(4, [3], [], NULL, {tv_sec=60, tv_usec=0}) = 0 (Timeout)
> [previous line repeated many times]
> select(4, [3], [], NULL, {tv_sec=60, tv_usec=0} 
>
> Also at some stage I was getting an undefined symbol error which was
> causing backups to fail.  I added the test below to fix it.  I don't
> know what I did that might have triggered this, it was incidental to
> trying to find out what was causing the select() timeouts.
>
> 8<--
> ged@tornado:/usr/share/backuppc/bin$ diff -U3 BackupPC_dump.~1~
> BackupPC_dump
> --- BackupPC_dump.~1~   2018-08-28 11:22:01.688465718 +0100
> +++ BackupPC_dump   2018-09-21 18:14:29.376719313 +0100
> @@ -2189,7 +2189,7 @@
>   }
>   } else {
>   foreach my $m ( @$msg ) {
> -print($LogFd $m);
> +print($LogFd $m) if( defined $LogFd && defined $m );
>   }
>   }
>   }
> 8<--
>
> HTH
>
> --
>
> 73,
> Ged.
>
>
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-30 Thread G.W. Haywood via BackupPC-users

Hi there,

On Tue, 30 Oct 2018, Craig Barratt wrote:


I've been reviewing the mail list over the last few months, and
there are still a couple of reported issues I'm trying to replicate
or learn more about.


I'm still looking at the issue I had with BackupPC a couple of months
ago (Re: BackupPC 4.2.1 apparently in an infinite loop.) and I think
it might have been a kernel problem.  At least after I upgraded the
kernel - and that's the only change that I made - the problem seemed
to go away.  Calls to select() in rsync_bpc were timing out.  Here's
an example strace output:

select(4, [3], [], NULL, {tv_sec=5, tv_usec=41543}) = 0 (Timeout)
select(4, [3], [], NULL, {tv_sec=60, tv_usec=0}) = 0 (Timeout)
[previous line repeated many times]
select(4, [3], [], NULL, {tv_sec=60, tv_usec=0} 

Also at some stage I was getting an undefined symbol error which was
causing backups to fail.  I added the test below to fix it.  I don't
know what I did that might have triggered this, it was incidental to
trying to find out what was causing the select() timeouts.

8<--
ged@tornado:/usr/share/backuppc/bin$ diff -U3 BackupPC_dump.~1~  BackupPC_dump
--- BackupPC_dump.~1~   2018-08-28 11:22:01.688465718 +0100
+++ BackupPC_dump   2018-09-21 18:14:29.376719313 +0100
@@ -2189,7 +2189,7 @@
 }
 } else {
 foreach my $m ( @$msg ) {
-print($LogFd $m);
+print($LogFd $m) if( defined $LogFd && defined $m );
 }
 }
 }
8<--

HTH

--

73,
Ged.


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-29 Thread Craig Barratt via BackupPC-users
Jean-Marc,

Do you know when 4.2.2 will be available ?


I've been reviewing the mail list over the last few months, and there are
still a couple of reported issues I'm trying to replicate or learn more
about.

Hopefully I get 4.2.2 out by the end of November.

Craig


On Mon, Oct 29, 2018 at 4:40 AM Jean-Marc  wrote:

> Hi Craig,
>
> I added the commit manually to bin/BackupPC with nano and dhcp is working
> nicely, thanks a lot !
>
> (don't know why, but i needed to restart backuppc.service twice for the
> changes to take effect)
>
> Also added the Lib.pm patch for url in server > state tasks list.
>
> Do you know when 4.2.2 will be available ?
>
> Thanks again
>
> JM
> Le 27/10/2018 à 19:01, Craig Barratt via BackupPC-users a écrit :
>
> I committed this fix
> ,
> with a couple of other minor tweaks.
>
> Craig
>
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-29 Thread Jean-Marc

Hi Craig,

I added the commit manually to bin/BackupPC with nano and dhcp is 
working nicely, thanks a lot !


(don't know why, but i needed to restart backuppc.service twice for the 
changes to take effect)


Also added the Lib.pm patch for url in server > state tasks list.

Do you know when 4.2.2 will be available ?

Thanks again

JM

Le 27/10/2018 à 19:01, Craig Barratt via BackupPC-users a écrit :
I committed this fix 
, 
with a couple of other minor tweaks.


Craig
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-27 Thread Craig Barratt via BackupPC-users
I committed this fix
,
with a couple of other minor tweaks.

Craig

On Fri, Oct 26, 2018 at 10:28 AM Jean-Marc  wrote:

> Thanks Craig,
>
> Will try this monday !
>
> Whishing you a good week-end
>
> Le 26/10/2018 à 18:30, Craig Barratt via BackupPC-users a écrit :
> > Jean-Marc,
> >
> > Thanks for the additional information.  Yes, it's a bug. Here's a
> > patch that should fix it.
> >
> > Craig
>
> > -if ( $Hosts->{$host}{dhcp} ) {
>
> > +if ( defined($Hosts->{$host}) && $Hosts->{$host}{dhcp} ) {
>
>
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-26 Thread Jean-Marc

Thanks Craig,

Will try this monday !

Whishing you a good week-end

Le 26/10/2018 à 18:30, Craig Barratt via BackupPC-users a écrit :

Jean-Marc,

Thanks for the additional information.  Yes, it's a bug. Here's a 
patch that should fix it.


Craig



-    if ( $Hosts->{$host}{dhcp} ) {



+    if ( defined($Hosts->{$host}) && $Hosts->{$host}{dhcp} ) {



___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-26 Thread Craig Barratt via BackupPC-users
Jean-Marc,

Thanks for the additional information.  Yes, it's a bug.  Here's a patch
that should fix it.

Craig

--- bin/BackupPC 2018-10-22 19:03:33.327873033 -0700
+++ bin/BackupPC 2018-10-26 09:18:50.178239319 -0700
@@ -1803,7 +1803,7 @@
 if ( defined($Status->{$host}{backoffTime})
   && $Status->{$host}{backoffTime} < time );
 return 1 if ( $BgQueueOn{$host} || $UserQueueOn{$host} );
-if ( $Hosts->{$host}{dhcp} ) {
+if ( defined($Hosts->{$host}) && $Hosts->{$host}{dhcp} ) {
 $Status->{$host}{dhcpCheckCnt}++;
 if ( $RunNightlyWhenIdle ) {
 #


On Fri, Oct 26, 2018 at 1:17 AM Jean-Marc  wrote:

> Hello Craig,
>
> Thanks for your help.
>
> Le 26/10/2018 à 07:05, Craig Barratt via BackupPC-users a écrit :
> > Does "nmblookup HOSTNAME" return the correct IP address for that
> > host?  See comments for the $Conf{NmbLookupFindHostCmd} option for
> > arguments you might need to add.
> My clients are in another subnet. I can't ping "name" nor nmblook "name"
> or nmblookup -B "broadcast"
> >
> > If so, then its IP address should be discovered correctly without the
> > dhcp flag.  (In almost all cases it's not necessary to use the dhcp
> flag.)
> >
> I'm afraid i'm in this special case, i need to use dhcp discovery loop.
>
> btw, dhcp flag works as intended, but only in the first wake up loop
> after service start.
>
> Like i said earlier, i suspect a sort of corruption of $host array by
> dhcp datas.
>
> Something like this :
>
> 1st QueueAllPC after service start :
>
> {
>
>  $host loop is clean and run only with non-dhcp flags clients,
> adding tasks to @BGQueue;
>
>   $dhcp loop run and adds BackupPC_dump -d (ip address) to @BGQueue;
>
>  something fills $host with dhcp flagged clients ?
>
> }
>
>
> Others QueueAllPC :
>
> {
>
>  $host loop is perhaps corrupted and adds _all_ clients, including
> dhcp ones, adding tasks BackupPC_dump (ip address) to @BGQueue;
>
>   $dhcp loop run and adds BackupPC_dump -d (ip address) to @BGQueue,
> but create duplicates jobs of $host loop who are canceled later in
> @BGQueue processing loop;
>
>}
>
>
> I mostly understand perl code, but i need to dump $host array to log
> between the two loops and dont know how to print full $host array to LOG
> (or elsewhere) to be sure there is a bug. (will try print
> join("\n",$host),"\n";   monday)
>
> I think it's essential to note that dhcp backup is ok if QueueAllPC
> loops are switched ($dhcp loop first, then $host loop), except if there
> is an ip address in machines list who's part of dhcp range. (problem
> inverted, jobs in the first loop deny duplicates in the second loop)
>
> I suspect a bug in dhcp stuff.
>
> Thanks
>
> JM
>
>
>
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-26 Thread Jean-Marc

Hello Craig,

Thanks for your help.

Le 26/10/2018 à 07:05, Craig Barratt via BackupPC-users a écrit :
Does "nmblookup HOSTNAME" return the correct IP address for that 
host?  See comments for the $Conf{NmbLookupFindHostCmd} option for 
arguments you might need to add.
My clients are in another subnet. I can't ping "name" nor nmblook "name" 
or nmblookup -B "broadcast"


If so, then its IP address should be discovered correctly without the 
dhcp flag.  (In almost all cases it's not necessary to use the dhcp flag.)



I'm afraid i'm in this special case, i need to use dhcp discovery loop.

btw, dhcp flag works as intended, but only in the first wake up loop 
after service start.


Like i said earlier, i suspect a sort of corruption of $host array by 
dhcp datas.


Something like this :

1st QueueAllPC after service start :

{

    $host loop is clean and run only with non-dhcp flags clients, 
adding tasks to @BGQueue;


 $dhcp loop run and adds BackupPC_dump -d (ip address) to @BGQueue;

    something fills $host with dhcp flagged clients ?

}


Others QueueAllPC :

{

    $host loop is perhaps corrupted and adds _all_ clients, including 
dhcp ones, adding tasks BackupPC_dump (ip address) to @BGQueue;


 $dhcp loop run and adds BackupPC_dump -d (ip address) to @BGQueue, 
but create duplicates jobs of $host loop who are canceled later in 
@BGQueue processing loop;


  }


I mostly understand perl code, but i need to dump $host array to log 
between the two loops and dont know how to print full $host array to LOG 
(or elsewhere) to be sure there is a bug. (will try print 
join("\n",$host),"\n";   monday)


I think it's essential to note that dhcp backup is ok if QueueAllPC 
loops are switched ($dhcp loop first, then $host loop), except if there 
is an ip address in machines list who's part of dhcp range. (problem 
inverted, jobs in the first loop deny duplicates in the second loop)


I suspect a bug in dhcp stuff.

Thanks

JM



___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-25 Thread Craig Barratt via BackupPC-users
JM,

Does "nmblookup HOSTNAME" return the correct IP address for that host?  See
comments for the $Conf{NmbLookupFindHostCmd} option for arguments you might
need to add.

If so, then its IP address should be discovered correctly without the dhcp
flag.  (In almost all cases it's not necessary to use the dhcp flag.)

Craig

On Thu, Oct 25, 2018 at 8:29 AM Jean-Marc  wrote:

> Hi,
>
> After digging and debugging, it seems to exist a tricky bug.
>
> I changed the *QueueAllPC* , basically switching the 2 loops.
>
> *foreach my $dhcp (...) { ... } *first, then
>
> *foreach my $host (...) { ... } *after
>
> dhcp backups works fine now, but can't use fixed ip if in the dhcp range.
> (i prefer this behavior)
>
> (just use netbios name with dhcp parameter = 1 is fine)
>
> I guess that first wake up (wrongly ?) fill an array ($host ?) with dhcp
> range ip and deny other runs to complete succesfully (debug needed between
> the 2 loops ? what's in $host ? Wich sub fill $host array after/during
> first backup ?)
>
> Thanks for help
>
> ___
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


Re: [BackupPC-users] DHCP backups - only once possible

2018-10-25 Thread Jean-Marc

Hi,

After digging and debugging, it seems to exist a tricky bug.

I changed the *QueueAllPC* , basically switching the 2 loops.

*foreach my $dhcp (...) { ... } *first, then

*foreach my $host (...) { ... } *after

dhcp backups works fine now, but can't use fixed ip if in the dhcp 
range. (i prefer this behavior)


(just use netbios name with dhcp parameter = 1 is fine)

I guess that first wake up (wrongly ?) fill an array ($host ?) with dhcp 
range ip and deny other runs to complete succesfully (debug needed 
between the 2 loops ? what's in $host ? Wich sub fill $host array 
after/during first backup ?)


Thanks for help


___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


[BackupPC-users] DHCP backups - only once possible

2018-10-24 Thread Jean-Marc

Hi BackupPC Users !

I installed a BackupPC 4.2.1 on CentOS 7.

All is fine, except one weird and (very) annoying behavior.

For one computer, i use the DHCP flag (can't fix ip, can't ping with 
name, nmblookup -A working fine).


Here is the "bug" :

if this computer is online, the _first_ backuppc "wake up" (queueAllPC) 
after


systemctl restart backuppc.service

is doing a backup just fine. All dhcp range ip address are "scanned" with

BackupPC_dump -d (ip address)

and there is no problem.

But, if :

1) the first "wake up" after backuppc service start dont find the 
computer (off network or shutdown)


or

2) the others wake up search for the online and ready computer

then BackupPC never find it and backup fail.

So, if i want a backup to success, the client computer must be online 
and i must restart backuppc service.


Heads up :

When the dhcp range is scanned first time, backuppc use : BackupPC_dump 
-d (ip address)


But all the others scan are : BackupPC_dump (ip address)

(missing -d)

Thanks

ps : i apologize for my bad english, as this not my native language.

JM



___
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/