Hello,

I tried to insert the incomplete job with bscan:

bacula@backup:~$ time /usr/sbin/bscan -s -m  /media/baculadisk1 -V DISK035
bscan: butil.c:292-0 Using device: "/media/baculadisk1" for reading.
03-Jun 15:17 bscan JobId 0: Ready to read from volume "DISK035" on File device 
"DiskStorage1" (/media/baculadisk1).
bscan: bscan.c:519-0 VOL_LABEL: OK for Volume: DISK035
03-Jun 18:19 bscan JobId 0: Error: block_util.c:467 Volume data error at 0:0!
Block checksum mismatch in block=27610 len=262144: calc=37e0942d blk=ae5f3e87
Records added or updated in the catalog:
      1 Media
      1 Pool
     63 Job
     63 File

real    182m8.401s
user    52m58.872s
sys     51m33.969s

By the way has not been worked. Looks like the Job has not been really updated
because it cannot restored as before:

bacula=> select * from jobmedia where jobid=84813;
 jobmediaid | jobid | mediaid | firstindex | lastindex | startfile | endfile | 
startblock |  endblock  | volindex
------------+-------+---------+------------+-----------+-----------+---------+------------+------------+----------
     628090 | 84813 |       0 |          1 |         2 |         0 |     383 |  
        0 | 1266266991 |        1
(1 row)

*rest

First you select one or more JobIds that contain files
to be restored. You will be presented several methods
of specifying the JobIds. Then you will be allowed to
select which files from those JobIds are to be restored.

To select the JobIds, you have the following choices:
     1: List last 20 Jobs run
     2: List Jobs where a given File is saved
     3: Enter list of comma separated JobIds to select
     4: Enter SQL list command
     5: Select the most recent backup for a client
     6: Select backup for a client before a specified time
     7: Enter a list of files to restore
     8: Enter a list of files to restore before a specified time
     9: Find the JobIds of the most recent backup for a client
    10: Find the JobIds for a backup for a client before a specified time
    11: Enter a list of directories to restore for found JobIds
    12: Select full restore to a specified Job date
    13: Cancel
Select item:  (1-13): 3
Enter JobId(s), comma separated, to restore: 84813
You have selected the following JobId: 84813

Building directory tree for JobId(s) 84813 ...
1 files inserted into the tree.

You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the "all" keyword on the command line.
Enter "done" to leave this mode.

cwd is: /
$ add *
2 files marked.
$ lsmark
*var/
  *lib/
    *bacula/
      *bacula.sql.lz4
$ done
Unable to get Job Volume Parameters. ERR=sql_get.c:429 No volumes found for 
JobId=84813

Unable to construct a valid BSR. Cannot continue.

I deleted the job because maybe bscan does not correct existing entries.
Then I tried first (by mistake) to rescan with bsr file but with the same 
result.

So job deleted again an re-bscan of the full volume:
bacula@backup:~$ /usr/sbin/bscan -s -v -m  /media/baculadisk1 -V DISK035
bscan: butil.c:292-0 Using device: "DiskStorage1" for reading.
04-Jun 07:23 bscan JobId 0: Ready to read from volume "DISK035" on File device 
"DiskStorage1" (/media/baculadisk1).
bscan: bscan.c:300-0 First Volume Size = 1646238741360
bscan: bscan.c:323-0 Using Database: bacula, User: bacula
done: 0%
bscan: bscan.c:468-0 Pool record for Scratch found in DB.
bscan: bscan.c:482-0 Pool type "Backup" is OK.
bscan: bscan.c:492-0 Media record for DISK035 found in DB.
bscan: bscan.c:510-0 Media type "Disk" is OK.
bscan: bscan.c:519-0 VOL_LABEL: OK for Volume: DISK035
bscan: bscan.c:537-0 SOS_LABEL: Found Job record for JobId: 83109
done: 1%
bscan: bscan.c:1084-0 Fileset "Catalog" already exists.
bscan: bscan.c:1214-0 Updated Job termination record for JobId=83109 Level=Full 
TermStat=T
...
bscan: bscan.c:1084-0 Fileset "Catalog" already exists.
bscan: bscan.c:1214-0 Updated Job termination record for JobId=84792 Level=Full 
TermStat=T
bscan: bscan.c:537-0 SOS_LABEL: Found Job record for JobId: 84814
done: 99%
bscan: bscan.c:1084-0 Fileset "Catalog" already exists.
bscan: bscan.c:1209-0 Could not update JobId=84813 record. ERR=bdb.h:140 Update 
failed: affected_rows=0 for UPDATE Job SET JobStatus='T',EndTime='2026-06-01 
02:11:40',ClientId=1,JobBytes=27807038876,ReadBytes=0,JobFiles=2,JobErrors=0,VolSessionId=22,VolSessionTime=1780252068,PoolId=2,FileSetId=36,JobTDate=1780272700,RealEndTime='2026-06-01
 02:11:40',PriorJobId=0,HasBase=0,PurgedFiles=0 WHERE JobId=84813

bscan: bscan.c:1303-0 Created JobMedia record JobId 84813, MediaId 632
04-Jun 12:03 bscan JobId 0: End of Volume "DISK035" at addr=1646238741360 on device 
"DiskStorage1" (/media/baculadisk1).
bscan: bscan.c:1017-0 Updated Media record at end of Volume: DISK035
bscan: bscan.c:384-0 First Volume Size = 1646238741360
bscan: bscan.c:1017-0 Updated Media record at end of Volume: DISK035
bscan: bscan.c:669-0 End of all Volumes. VolFiles=0 VolBlocks=0 
VolBytes=1,645,541,697,728
04-Jun 12:03 bscan JobId 0: Error: 4 block read errors not printed.
Records added or updated in the catalog:
      1 Media
      1 Pool
     81 Job
    100 File

Looks like the job wants to update an non existing job?

bacula=> select * from Job where JobId=84813;
 jobid | job | name | type | level | clientid | jobstatus | schedtime | 
starttime | endtime | realendtime | jobtdate | volsessionid | volsessiontime | 
jobfiles | jobbytes | joberrors | jobmissingfiles | poolid | filesetid | 
purgedfiles | hasbase | priorjobid | readbytes | hascache | reviewed | comment
-------+-----+------+------+-------+----------+-----------+-----------+-----------+---------+-------------+----------+--------------+----------------+----------+----------+-----------+-----------------+--------+-----------+-------------+---------+------------+-----------+----------+----------+---------
(0 rows)

No Job entry created. Any idea why?

Cheers,






_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to