On 27.3.2010 22:11, Johannes Studt wrote:
> 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 ;)
>
I can't think now fully, but what I see wrong that you use "sleep" and
"&& sleep" in your command. Those are not valid arguments to "ssh"
executable, but shell constructs. You many need to run "sh -c" with all
those arguments in order to get it work.
--
http://www.iki.fi/jarif/
You are a bundle of energy, always on the go.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------
Download Intel® 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
|