Hello,

for bareos backup setup I'm working on I need to pass client name to my script.
It is clientless/networkless backup in oVirt virtualization where I have only 
one 
client fd  (vm that  has bareos installed), snapshot disks from other vm get 
attached 
to it, backuped, detached, etc.

So to differ jobs better at restore time I add clients that point to same fd 
like this:

Client {
  Name = testvm # Virtual Machine Name
  Description = "VM testvm"
  Address = localhost
  Password = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}

the problem is that dir honnors the client name in config but it is lost 
until fd runs the script line.

If I run following job:

Job {
  Name = 00_TestBackupJob
  JobDefs = "00_TestBackupJobDefs"
  Client = "testvm"
}

JobDefs {
  Name = "00_TestBackupJobDefs"
  Type = Backup
  ...
  Run Script {
        RunsWhen = Before
        FailJobOnError = Yes
        Command = "/root/bin/testjob before \"%c\" \"%j\""
  }

  Run Script {
        RunsWhen = After
        FailJobOnError = Yes
        Command = "/root/bin/testjob after \"%c\" \"%j\""
  }

}

I get in log:

        bareos-dir JobId 267: Bareos bareos-dir 16.2.4 (01Jul16):
        Build OS: x86_64-redhat-linux-gnu redhat CentOS Linux release 7.0.1406 
(Core)
        JobId: 267
        Job: 00_TestBackupJob.2017-05-16_09.39.27_18
        Backup Level: Full
        Client: "testvm" 16.2.4 (01Jul16) x86_64-redhat-linux-gnu,redhat,CentOS 
Linux release 7.0.1406 (Core) ,CentOS_7,x86_64
        FileSet: "00_TestBackupJobFileSet" 2017-05-16 09:39:27
        Pool: "Full" (From Job FullPool override)

which states "correct" client name "testvm" but later
%c is changed to "backup1-fd" in line:

        backup1-fd JobId 267: shell command: run ClientAfterJob 
"/root/bin/testjob after "backup1-fd" "00_TestBackupJob.2017-05-16_09.39.27_18""

Probably because fd simply places it's own name instead of %c.

Is it possible to somehow pass the configured client name to script ? Or maybe 
another approach to
configuring clientless backup in bareos ?

best regards,
dori

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to