[Bacula-users] Accidentally deleted a running jobid during a backup - Any hint on how to address?

2018-06-02 Thread Ben Wong
Hello,

I was trying to clean up my failed jobs from my catalog but I happened to
accidentally delete the jobid of a running job.  Stupid, I know.  From what
I can see, the backup looks like it succeeded, it only appears failed due
to bacula being unable to find original jobid because I deleted it.

Is there a simple way to retrieve that catalog data for the jobid I
deleted?  The backup is written across four LTO7 tape volumes.  I was
thinking of redoing the backup and not deleting the jobid but maybe there's
an option  where I don't have to rewrite all that data?

Here's the error I get:  JobID 245 is the job I accidentally deleted.
02-Jun 20:38 bacula-dir JobId 245: Warning: Error updating job record.
sql_update.c:202 Update failed: affected_rows=0 for UPDATE Job SET
JobStatus='T',EndTime='2018-06-02 20:38:50',ClientId=8,JobBytes=
40063503226963,ReadBytes=40063503226963,JobFiles=2684608,JobErrors=28,
VolSessionId=8,VolSessionTime=1527615994,PoolId=4,FileSetId=
8,JobTDate=1527997130,RealEndTime='2018-06-02
20:38:50',PriorJobId=0,HasBase=0,PurgedFiles=0
WHERE JobId=245
02-Jun 20:38 bacula-dir JobId 245: Warning: Error getting Job record for
Job report: ERR=sql_get.c:318 No Job found for JobId 245


Thanks for any help,
Benjamin Wong

p.s.
bacula version 5.2.13
CentOS 7.5
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Mysql / status client discrepancy

2018-06-02 Thread Kern Sibbald

It is impossible.

On 06/01/2018 01:43 PM, Steffen Schwebel wrote:

Hello,

thanks.

Do you know any way to query the database to get the same output as
bconsole "status client"?

regards,
Steffen

On 06/01/2018 11:26 AM, Kern Sibbald wrote:

Hello,

status client and select clients from the catalog are two totally
different commands.  Their outputs are different and the way they work
are totaldifferent.  So trying to compare them is not useful.

status client shows you clients to which the Director can connect at
that moment as defined in the bacula-dir.conf file.

Looking at client records in the catalog with show you all non-deleted
clients that have ever been referenced during the whole life of your
Bacula installation.

Best regards,
Kern

On 05/28/2018 04:59 PM, Steffen Schwebel wrote:

Hello,

Ive been working with Bacula and see a discrepany I cant explain:

mysql bacula -e "select * from Client" -ss | wc -l
336

echo "status client" | bconsole | wc -l
241

I tried to use the dbcheck to correct this mismatch.
But that is showing me 16 orhpaned clients. It should close to a
hundred.

What am I missing?


Best regards,
Steffen Schwebel


--

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Mysql / status client discrepancy

2018-06-02 Thread Steffen Schwebel
sadface

Thanks for your time


On 06/02/2018 01:43 PM, Kern Sibbald wrote:
> It is impossible.
>
> On 06/01/2018 01:43 PM, Steffen Schwebel wrote:
>> Hello,
>>
>> thanks.
>>
>> Do you know any way to query the database to get the same output as
>> bconsole "status client"?
>>
>> regards,
>> Steffen
>>
>> On 06/01/2018 11:26 AM, Kern Sibbald wrote:
>>> Hello,
>>>
>>> status client and select clients from the catalog are two totally
>>> different commands.  Their outputs are different and the way they work
>>> are totaldifferent.  So trying to compare them is not useful.
>>>
>>> status client shows you clients to which the Director can connect at
>>> that moment as defined in the bacula-dir.conf file.
>>>
>>> Looking at client records in the catalog with show you all non-deleted
>>> clients that have ever been referenced during the whole life of your
>>> Bacula installation.
>>>
>>> Best regards,
>>> Kern
>>>
>>> On 05/28/2018 04:59 PM, Steffen Schwebel wrote:
 Hello,

 Ive been working with Bacula and see a discrepany I cant explain:

 mysql bacula -e "select * from Client" -ss | wc -l
 336

 echo "status client" | bconsole | wc -l
 241

 I tried to use the dbcheck to correct this mismatch.
 But that is showing me 16 orhpaned clients. It should close to a
 hundred.

 What am I missing?


 Best regards,
 Steffen Schwebel


 --


 Check out the vibrant tech community on one of the world's most
 engaging tech sites, Slashdot.org! http://sdm.link/slashdot
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users

>>
>> --
>>
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users