Bacula-users

[Bacula-users] Problem establishing ssh tunnel in Run before script

2010-03-27 16:29:58
Subject: [Bacula-users] Problem establishing ssh tunnel in Run before script
From: Johannes Studt <j.studt AT chdstudt DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 27 Mar 2010 21:11:37 +0100
Hi there,

to one of my clients I'm trying to connect via a ssh tunnel like this:

-------------------------------
bacula-dir.conf:

Client {
  Name = majestix-fd
  Address = localhost
  FDPort = 9202
  Catalog = MyCatalog
  Password = "xyz"          # password for FileDaemon
  File Retention = 30 days            # 30 days
  Job Retention = 6 months            # six months
  AutoPrune = yes                     # Prune expired Jobs/Files
}

# [...]

Job {
  Name = "Majestix Daily Backup On LTO1 Tapes"
  Type = Backup
  Client = majestix-fd
  FileSet = MajestixAll
  Schedule = DailyFileBackup
  Storage = TapeStorageLTO1
  Pool = DailyBackupLTO1
  Messages = Standard
  Run Before Job = "/usr/bin/ssh -fC2 -R 9101:localhost:9101 -R 
9103:localhost:9103 -L 9202:localhost:9102 majestix sleep 60 && sleep 10"
  # "&& sleep 10" to give ssh some time to settle
  SpoolData = yes
  Rerun Failed Levels = yes
}
-------------------------------
majestix's bacula-fd.conf:

FileDaemon {                          # this is me
  Name = majestix-fd
  FDport = 9102                  # where we listen for the director
  FDaddress = localhost
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 20
  Heartbeat Interval = 300
}
-------------------------------

With this configuration I'm getting the following error:

-------------------------------
2010-03-27 17:47:06 fileserver-dir Start Backup JobId 601, 
Job=Majestix_Daily_Backup_On_LTO1_Tapes.2010-03-27_17.45.53_05 Using Device 
"TapeStorageLTO1"

2010-03-27 17:47:06 fileserver-sd JobId=601 
Job="Majestix_Daily_Backup_On_LTO1_Tapes.2010-03-27_17.45.53_05" marked to be 
canceled.

2010-03-27 17:47:06 fileserver-dir Fatal error: No Job status returned from 
FD.
-------------------------------

The ssh tunnel is up and running, I'm able to connect to the tunnel end points 
with telnet on each side of the connection.

If I - instead of using the "Run before" statement - establish the ssh tunnel 
on the console right before starting the backup job with accurately the same 
command line

/usr/bin/ssh -fC2 -R 9101:localhost:9101 -R 9103:localhost:9103 -L 
9202:localhost:9102 majestix sleep 60

the backup job runs without any error.

What's the difference between establishing the ssh tunnel on the console 
versus the "Run before" statement?

Thx for reading ;)

-- 
mit freundlichen Grüßen / best regards

Johannes Studt

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>