[Bacula-users] Restore Remote via SSH with one job only

2007-01-03 Thread Markus Schulz
Hello,

i'm using bacula 1.36.2-2sarge1 and want to backup several remote 
maschines only available via ssh tunnels.

For this i'm having some jobs like:

Job {
  Name = Client
  JobDefs = DefaultRemoteJob
  Client = FQDN
  Run Before Job = /etc/bacula/ssh-tunnel.sh start %c
  Run After Job = /etc/bacula/ssh-tunnel.sh stop %c
  Write Bootstrap = /var/lib/bacula/ClientRoot2.bsr
}

The backup works fine with %c as FQDN for each Client. (Run Before und 
After can also be declared inside JobDefs if i understand the %c 
replacement correctly.

But my restore Job don't work.

Job {
  Name = RestoreRemote
  Type = Restore
  Client = NEEDED_CLIENT_NAME
  FileSet=StdSet
  Storage = File
  Pool = Default
  Messages = Standard
  Run Before Job = /etc/bacula/ssh-tunnel.sh start %c
  Run After Job = /etc/bacula/ssh-tunnel.sh stop %c
  Where = /
}

If i start a restore job, i select the client to restore to in bconsole. 
Why i need to declare e client inside the Job Definition? The %c in Run 
Before and After would not be replaced with the selected client but 
with the Client in the Job Definition. So i need for each Remote Server 
an own Restore Job.

Is there any way to do this with only one restore job for all remote 
servers?

-- 
Markus Schulz

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Restore Remote via SSH with one job only

2007-01-03 Thread Markus Schulz
Am Mittwoch, 3. Januar 2007 13:25 schrieb [EMAIL PROTECTED]:
 On Wed, Jan 03, 2007 at 01:11:09PM +0100, Markus Schulz wrote:
  Hello,
 
  i'm using bacula 1.36.2-2sarge1 and want to backup several remote
  maschines only available via ssh tunnels.

 wouldn't it be easyer to change your tunnel machnism from SSH Port
 Tunneling to openvpn ?

too much overhead for the number of machines.

 http://www.bacula.org/dev-manual/Variable_Expansion.html
 
 Client
 -- the Client's name


 Run Before Job = /etc/bacula/ssh-tunnel.sh start ${Client}
 but besure to type it casesensitve ...

looks like something which doen't exists in 1.36.2 and for me it looks 
like the same as %c expansion. But the %c expansion would be done to 
the configured client inside the job definition and not to the selected 
machine on restore command.

-- 
Markus Schulz


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Restore Remote via SSH with one job only

2007-01-03 Thread Eric Bollengier
Hi,

You have found a bug, i think we can correct this with this patch :

--- my/src/dird/ua_run.c2006-12-30 16:36:37.0 +0100
+++ cvs/src/dird/ua_run.c   2007-01-03 20:23:43.0 +0100
@@ -467,6 +467,7 @@
jcr-pool = pool;
set_rwstorage(jcr, store);
jcr-client = client;
+   pm_strcpy(jcr-client_name, client-name());
jcr-fileset = fileset;
jcr-ExpectedFiles = files;
if (catalog != NULL) {

I don't know if kern will accept this patch for the 2.0.0 release. I think
it's too late.

You can patch it yourself.

Bye


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users