0

I'm taking backups with Bareos and would like to verify my database backup every once in a while.
For this I have set up a separate host called backupvalidator. I know how I can restore the files to this host via bconsole commands, where I list the jobs that were running lately, pick the right job and specify the file path and which files to restore.

What I can't figure out, is, how I can specify this job in a config file. In the manual there's this example:

Job {  
  Name = "RestoreFiles"  
  Type = Restore  
  Client = Any-client  
  FileSet = "Any-FileSet"  
  Storage = Any-storage  
  Where = /tmp/bareos-restores  
  Messages = Standard  
  Pool = Default  
}

But I can't find an option, with which I can specify from which client to which client I want to restore. It seems like I can only specify in the job, that the files are restored on the same client, the backup was taken from.
Is it not possible to automate it this way? Is my only option to have a cronjob, that copies the backup files to my backupvalidator host?

tombom
  • 105
  • 6

2 Answers2

2

Job type "Restore" is not intended for actual job definitions, but as a template for running restore in the console.

From the manual, section 9.2, on (Job) Type=Restore:

.. Normally, you will specify only one Restore job which acts as a sort of prototype that you will modify using the console program in order to perform restores. ..

Restore jobs cannot be automatically started by the scheduler as is the case for Backup, Verify and Admin jobs. To restore files, you must use the restore command in the console.

Thomas C
  • 36
  • 2
0

In bacula, there is the option restoreclient to declare the client to put the saved files : http://www.bacula.org/5.1.x-manuals/en/main/main/Restore_Command.html

By default, if you have only the option client declared in your job, it will define the source and the destination of the restore job.

If you want to plan a restoration, you can add the option schedule in your job declaration.

Sorcha
  • 1,315
  • 8
  • 11
  • Thank you very much, but unfortunately I get this error message: "ERROR in parse_conf.c:292 Config error: Keyword "RestoreClient" not permitted in this resource". (And I tried different upper/lowercase). In the manual this is also just mentioned as console command option. – tombom May 31 '17 at 14:17