Ok, the first mystery is probably solved:

In my logs, I found entries like this:

2019-03-09 01:05:02heBacula-dir JobId 5385: shell command: run BeforeJob 
"/opt/bacula/scripts/make_catalog_backup.pl MyCatalog"
2019-03-09 01:05:57heBacula-dir JobId 5385: Start Backup JobId 5385, 
Job=Job_heBacula_BackupCatalog.2019-03-09_01.05.00_22
2019-03-09 01:05:57heBacula-dir JobId 5385: There are no more Jobs associated with Volume 
"FullBackup-SQL_heBacula-fd__299__2018-05-23T01.05.55". Marking it purged.
2019-03-09 01:05:57heBacula-dir JobId 5385: All records pruned from Volume 
"FullBackup-SQL_heBacula-fd__299__2018-05-23T01.05.55"; marking it "Purged"
2019-03-09 01:05:57heBacula-dir JobId 5385: Recycled volume 
"FullBackup-SQL_heBacula-fd__299__2018-05-23T01.05.55"
2019-03-09 01:05:57heBacula-dir JobId 5385: Using Device "AC-FullBackup-Dev01" 
to write.
2019-03-09 01:05:58heBacula-sd JobId 5385: Recycled volume 
"FullBackup-SQL_heBacula-fd__299__2018-05-23T01.05.55" on File device 
"AC-FullBackup-Dev01" (/srv/bacula-sd/AC-FullBackup), all previous data lost.
2019-03-09 01:05:58heBacula-dir JobId 5385: Max Volume jobs=1 exceeded. Marking Volume 
"FullBackup-SQL_heBacula-fd__299__2018-05-23T01.05.55" as Used.


Checking the volume configuration (list volumes) I saw that there were some (old) volumes that had recycle=1 set.
bconsole -> update -> volume parameters -> All Volumes from all Pools
solved that.

But the volume in question was from 2019 (FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32) so it was not an old volume.

Any why I cannot navigate the virtual file system in restore after bscan'ing the volume is still a mystery to me :-(


regards,
Thorsten



On 14.03.19 16:03, Thorsten Johannsen wrote:
Hello,

I'm currently pulling my hair over bacula because backed up data is not where it is supposed to be.


A little background, perhaps:

-------------------------------------------------------------------------------------------------------------------------------

- Bacula Version: heBacula-dir Version: 9.0.7 (18 April 2018) x86_64-pc-linux-gnu redhat (Core) (compiled from source)

- File based backup, three pools: Pool_FullBackup, Pool_DiffBackup, Pool_IncBackup

- Pool definition:

Pool {
  Name = "Pool_FullBackup"
  ActionOnPurge = Truncate
  Catalog = "MyCatalog"
  FileRetention = 6912000
  JobRetention = 6912000
  LabelFormat = "FullBackup__${Client}__${JobId}__${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}T${Hour:p/2/0/r}.${Minute:p/2/0/r}.${Second:p/2/0/r}"
  MaximumVolumeBytes = 4194304000
  MaximumVolumeJobs = 1
  PoolType = "Backup"
  PurgeOldestVolume = no
  Recycle = no
  RecycleOldestVolume = no
  Storage = "heBacula-sd-AC-FullBackup"
  VolumeRetention = 6912000
}


-------------------------------------------------------------------------------------------------------------------------------


This should give one or several backup files per job, encoded with the data stated in the "LabelFormat" stanza.

Now I'm trying to restore some files, but Bacula states that some of the information (files?) is missing and it cannot create a virtual tree to traverse.

The file "FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32" is actually present on disc, but when running bscan on it, I cannot believe my eyes:


#################################
sudo /opt/bacula/bin/bscan -c /opt/bacula/etc/bacula-sd.conf -v -V FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32 `pwd`
[sudo] password:
14-Mar 12:35 bscan JobId 0: Warning: Failed to find any plugins in /opt/bacula/plugins bscan: butil.c:292-0 Using device: "/srv/bacula-sd/AC-FullBackup" for reading. 14-Mar 12:35 bscan JobId 0: Ready to read from volume "FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32" on File device "AC-FullBackup-Dev01" (/srv/bacula-sd/AC-FullBackup).
bscan: bscan.c:323-0 Using Database: bacula, User: bacula
bscan: bscan.c:468-0 Pool record for Pool_FullBackup found in DB.
bscan: bscan.c:482-0 Pool type "Backup" is OK.
bscan: bscan.c:492-0 Media record for FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32 found in DB. [***]
bscan: bscan.c:510-0 Media type "MT-heBacula-sd-AC-FullBackup" is OK.
bscan: bscan.c:519-0 VOL_LABEL: OK for Volume: FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32 bscan: bscan.c:537-0 SOS_LABEL: Found Job record for JobId: 5270                                      [***] bscan: bscan.c:715-0 32,768 file records. At addr=2,205,600,960 bytes=2,204,337,019 14-Mar 12:36 bscan JobId 0: End of Volume "FullBackup__hexbmc02-fd__5269__2019-03-03T20.35.32" at addr=3037471421 on device "AC-FullBackup-Dev01" (/srv/bacula-sd/AC-FullBackup). bscan: bscan.c:670-0 End of all Volumes. VolFiles=0 VolBlocks=0 VolBytes=3,035,776,813
Records would have been added or updated in the catalog:
      1 Media
      1 Pool
      1 Job
  63462 File
##################################


The lines marked with [***] say that inside volume for jobID 5269 the job record (data) for job 5270 is found. How is this possible?


A spot check shows that in general the connection between volume name and content is correct:

#################################
sudo /opt/bacula/bin/bscan -c /opt/bacula/etc/bacula-sd.conf -v -V FullBackup__hexbmc01-fd__5268__2019-03-03T20.29.12 `pwd`
[sudo] password for user:
14-Mar 13:07 bscan JobId 0: Warning: Failed to find any plugins in /opt/bacula/plugins bscan: butil.c:292-0 Using device: "/srv/bacula-sd/AC-FullBackup" for reading. 14-Mar 13:07 bscan JobId 0: Ready to read from volume "FullBackup__hexbmc01-fd__5268__2019-03-03T20.29.12" on File device "AC-FullBackup-Dev01" (/srv/bacula-sd/AC-FullBackup).
bscan: bscan.c:323-0 Using Database: bacula, User: bacula
bscan: bscan.c:468-0 Pool record for Pool_FullBackup found in DB.
bscan: bscan.c:482-0 Pool type "Backup" is OK.
bscan: bscan.c:492-0 Media record for FullBackup__hexbmc01-fd__5268__2019-03-03T20.29.12 found in DB. [***]
bscan: bscan.c:510-0 Media type "MT-heBacula-sd-AC-FullBackup" is OK.
bscan: bscan.c:519-0 VOL_LABEL: OK for Volume: FullBackup__hexbmc01-fd__5268__2019-03-03T20.29.12 bscan: bscan.c:537-0 SOS_LABEL: Found Job record for JobId: 5268                                      [***] bscan: bscan.c:715-0 32,768 file records. At addr=880,717,993 bytes=880,194,043 bscan: bscan.c:715-0 65,536 file records. At addr=1,498,678,331 bytes=1,497,838,085 bscan: bscan.c:715-0 98,304 file records. At addr=2,840,656,889 bytes=2,839,068,961 14-Mar 13:08 bscan JobId 0: End of Volume "FullBackup__hexbmc01-fd__5268__2019-03-03T20.29.12" at addr=3292729803 on device "AC-FullBackup-Dev01" (/srv/bacula-sd/AC-FullBackup). bscan: bscan.c:670-0 End of all Volumes. VolFiles=0 VolBlocks=0 VolBytes=3,290,892,959
Records would have been added or updated in the catalog:
      1 Media
      1 Pool
      1 Job
 109947 File

#################################


To make things even more frustrating: I found a volume for hexbmc02-fd with a full backup and added it to catalogue with bscan.

Now, when running restore, it "cannot find the files":


#################################
*restore jobid=4285
You have selected the following JobId: 4285

Building directory tree for JobId(s) 4285 ... ++++++++++++++++++++++++++++++++++++++++++++

For one or more of the JobIds selected, no files were found,
so file selection is not possible.
Most likely your retention policy pruned the files.

Do you want to restore all the files? (yes|no):
#################################



When I list the files, however, it seems to work:

#################################



[...]


| /home/user/.xbmc/userdata/Thumbnails/c/c256d195.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/cb4e69ac.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c431f168.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/ce4bca12.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c9157e81.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/cbcf1548.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/cde4ab63.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/cb5c9580.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c382ff05.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c007c6ff.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c3c31334.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/ce1bd54e.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c7f8003f.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/c5029392.jpg |
| /home/user/.xbmc/userdata/Thumbnails/c/ |
| /home/user/.xbmc/userdata/Thumbnails/ |
| /home/user/.xbmc/userdata/guisettings.xml |
| /home/user/.xbmc/userdata/profiles.xml |
| /home/user/.xbmc/userdata/ |

+----------+
+-------+--------------+---------------------+------+-------+----------+---------------+-----------+ | JobId | Name         | StartTime           | Type | Level | JobFiles | JobBytes      | JobStatus | +-------+--------------+---------------------+------+-------+----------+---------------+-----------+ | 4,285 | Job_hexbmc02 | 2019-01-06 20:31:45 | B    | F     | 108,599 | 4,172,381,517 | E         | +-------+--------------+---------------------+------+-------+----------+---------------+-----------+


#################################


Any help would be greatly appreciated.

Thanks in advance,

Thorsten







_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users




_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to