Hello list!

I have some kind of problem when trying to restore files I've backed up with bacula.

Please let me walk you trough my setup first:


For my Bacula installation I defined three Pools:

 - Pool_FullBackup
 - Pool_DiffBackup
 - Pool_IncBackup


My  DIR Job Definition looks like this:
--------------------------------------------------------------------
Job {
  Name = "Job_hexbmc02"
  Client = "hexbmc02-fd"
  DifferentialBackupPool = "Pool_DiffBackup"
  Fileset = "FileSet_RHEL-FullBackup"
  FullBackupPool = "Pool_FullBackup"
  IncrementalBackupPool = "Pool_IncBackup"
  JobDefs = "JD_heDefault"
  Pool = "Pool_IncBackup"
  Schedule = "FullDiffInc-DailyBackup_Evening_Schedule"
  Storage = "heBacula-sd-AC-FullBackup"
  WriteBootstrap = "/opt/bacula/working/%c_%n.bsr"
}
--------------------------------------------------------------------


A DIR Pool definition
--------------------------------------------------------------------

Pool {
  Name = "Pool_FullBackup"
  ActionOnPurge = Truncate
  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"
  Recycle = no
  Storage = "heBacula-sd-AC-FullBackup"
}

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


A SD Backup device:
--------------------------------------------------------------------
Device {
  Name = AC-FullBackup-Dev01
  Media Type = MT-heBacula-sd
  Archive Device = /srv/bacula-sd/AC-FullBackup
  LabelMedia = yes;                   # lets Bacula label unlabeled media
  Random Access = Yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5
}


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


Now, backups seem to run as expected:

* all Fullbackups labeled FullBackup__${Client}_[...] end up in the /srv/bacula-sd/AC-FullBackup directory.

* all Diffbackups labeled  DiffBackup__${Client}_[...] end up in the /srv/bacula-sd/AC-DiffBackup directory.

* all Incbackups labeled  IncBackup__${Client}_[...] end up in the /srv/bacula-sd/AC-IncBackup directory.





Yesterday I needed to restore some files. I used bconsole -> restore -> 5: Select the most recent backup for a client -> <SELECT CLIENT> -> <SELECT FILESET>

I selected some files to restore and started the restore.


Now, what happened is the following:

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

2018-02-23 20:33:43heBacula-dir JobId 1089: Start Restore Job 
Job_RestoreFiles.2018-02-23_20.33.41_33
2018-02-23 20:33:43heBacula-dir JobId 1089: Using Device "AC-FullBackup-Dev03" 
to read.
2018-02-23 20:33:43heBacula-sd JobId 1089:Ready to read from volume "FullBackup__hexbmc02-fd__875__2018-02-04T20.05.13" on File device "AC-FullBackup-Dev03" (/srv/bacula-sd/AC-FullBackup).
2018-02-23 20:33:43heBacula-sd JobId 1089: Forward spacing Volume 
"FullBackup__hexbmc02-fd__875__2018-02-04T20.05.13" to addr=999936268
2018-02-23 20:34:12heBacula-sd JobId 1089:End of Volume at addr=3552030657 on device "AC-FullBackup-Dev03" (/srv/bacula-sd/AC-FullBackup), Volume "FullBackup__hexbmc02-fd__875__2018-02-04T20.05.13" 2018-02-23 20:34:12heBacula-sd JobId 1089: Warning: acquire.c:234 Read openFile device "AC-FullBackup-Dev03" (/srv/bacula-sd/AC-FullBackup) Volume "DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46" failed: ERR=file_dev.c:189Could not open(/srv/bacula-sd/AC-FullBackup/DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46,OPEN_READ_ONLY,0640): ERR=No such file or directory

2018-02-23 20:34:12heBacula-sd JobId 1089: Warning: acquire.c:234 Read open File device 
"AC-FullBackup-Dev03" (/srv/bacula-sd/AC-FullBackup) Volume 
"DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46" failed: ERR=file_dev.c:189 Could not 
open(/srv/bacula-sd/AC-FullBackup/DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46,OPEN_READ_ONLY,0640):
 ERR=No such file or directory

2018-02-23 20:34:12heBacula-sd JobId 1089: Please mount read Volume 
"DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46" for:
    Job:          Job_RestoreFiles.2018-02-23_20.33.41_33
    Storage:      "AC-FullBackup-Dev03" (/srv/bacula-sd/AC-FullBackup)
    Pool:         Pool_FullBackup
    Media type:   MT-heBacula-sd
2018-02-23 20:39:12heBacula-sd JobId 1089: Warning: acquire.c:234 Read open File device 
"AC-FullBackup-Dev03" (/srv/bacula-sd/AC-FullBackup) Volume 
"DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46" failed: ERR=file_dev.c:189 Could not 
open(/srv/bacula-sd/AC-FullBackup/DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46,OPEN_READ_ONLY,0640):
 ERR=No such file or directory


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



As far as I read this information, the following has happened:

1) Backup looked up the required Full Backup and started restore (or searched this volume for the files to be restored) -> OK 2) Bacula reached the end of this volume and tried to "mount" the next volume containing data for this client -> OK

3) Bacula tried to mount a DiffBackup volume into a FullBackup "device":

Could not 
open(/srv/bacula-sd/AC-FullBackup/DiffBackup__hexbmc02-fd__1029__2018-02-18T20.00.46,OPEN_READ_ONLY,0640)


This is wrong, since the DiffBackup volumes are in the AC-DiffBackup directory. 
Now, I was able to complete the restore by
sym-linking the file from AC-DiffBackup to AC-FullBackup.


But anyway this seems to be wrong. Unfortunately I have no idea how to tell the restore 
command to use the "correct" Autochanger.


Moreover, I would expect that the Volume Information and the Device information 
would somehow correlate in the database?



Any help / pointer into the right direction in order to solve this (and maybe 
get a better understanding about Bacula)  would be greatly appreciated!

Thanks in advance,


Thorsten

------------------------------------------------------------------------------
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

Reply via email to