Re: [Bacula-users] bacula 5.2.10 on Windows 2008 R2 server : 1 MByte/sec transfer rate, very slow

2012-09-05 Thread Paul Van Wambeke

On 5/09/2012 02:52, James Harper wrote:
   Hi

 I have Bacula 5.01 Director installed on a Linux Ubuntu 10.04 server, and a
 Bacula 5.2.10 Client (Bacula-fd) running on a Windows Server 2008
 R2 SP1 server, with Hyper-V role installed. Purpose is her to backup the host
 server, not the virtual machines.

 Initially the backup transfer rate was extremely slow (kbytes/sec).
 Changing the Network adapter (Broadcom NetXstreme 5714) settings to
 Large end Offload (LSO) = off as suggested in some posts increased the
 transfer rate to 1MB/sec, which is still 10 to 80 times slower than the 
 transfer
 rates I have with other servers running Linux or Windows 7. Transferring a 
 file
 'by hand' over the net runs at 80 MB/sec ...So I suspect a problem with
 Bacula-fd.

 Any idea how to configure the server so that I can get decent backup transfer
 speeds ? I can't imagine these servers can't be managed by Bacula.

 First use something like iperf to make sure that the problem is not bacula. 
 Test all possible combinations of send/receive for the following:

 . host server
 . bacula sd server
 . another pc/server that is separate (can be linux or windows)

 That should give you concrete evidence as to whether the problem is related 
 to bacula. Hyper-V network can be terribly difficult in some cases.

 James




 -
 Aucun virus trouve dans ce message.
 Analyse effectuee par AVG - www.avg.fr
 Version: 2012.0.2197 / Base de donnees virale: 2437/5249 - Date: 04/09/2012




Thanks James for the suggestion.

I have made the performance tests : copying a file from the host server 
to another Windows 7 PC was done at 80MBytes/sec.

Using iperf I measured following performances :

bacula-fd = the windows server 2008 R2 host, 1Gb/sec NIC
bacula-dir = a linux ubuntu 10.04 PC, 1 100Mb/sec NIC
bacula-sd = a linux ubuntu 10.04 server, 1 Gbite/sec NIC


iperf serveriperf clientPerformance
--- 

bacula-fdbacula-dir10 MBytes/sec
bacula-fdbacula-sd111 MBytes/sec
bacula-dirbacula-fd10 MBytes/sec
bacula-sdbacula-fd 26 MBytes/sec

So normally the bacula client should be able to write to the bacula 
storage at 26MBytes/sec ?

Any suggestions ?

Paul

-- 
Paul VAN WAMBEKE
ICT OpenUp! and GPI Projects
National Botanic Garden of Belgium
Bouchout Domain, Nieuwelaan 38
1860 Meise

Tel: ++32 2 260 09 66
Fax: ++32 2 260 09 45


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula 5.2.10 on Windows 2008 R2 server : 1 MByte/sec transfer rate, very slow

2012-09-05 Thread James Harper
 Using iperf I measured following performances :
 
 bacula-fd = the windows server 2008 R2 host, 1Gb/sec NIC bacula-dir = a linux
 ubuntu 10.04 PC, 1 100Mb/sec NIC bacula-sd = a linux ubuntu 10.04 server, 1
 Gbite/sec NIC
 
 
 iperf serveriperf clientPerformance
 --- 
 
 bacula-fdbacula-dir10 MBytes/sec
 bacula-fdbacula-sd111 MBytes/sec
 bacula-dirbacula-fd10 MBytes/sec
 bacula-sdbacula-fd 26 MBytes/sec
 
 So normally the bacula client should be able to write to the bacula storage at
 26MBytes/sec ?
 
 Any suggestions ?
 

Any crappy computer made in the last 5 years should be able to saturate a 
gigabit link using iperf. The fact that you are only getting 26Mbytes/second 
fd-sd is a bit worrying... it's well above the 1Mbit/second that bacula 
appears to be limited to but it's still an indication of a major problem. I 
haven't had that much experience with Hyper-V for performance testing but it 
should be able to approach Xen which easily gets gigabit speeds for Windows 
VMs. Is your switch up to the job?

James


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Bad response from stored to open command

2012-09-05 Thread Silviu Tufler
Hello

I have a problem regarding bacup with bacula.
The dir (version 5.2.9-1.1) and the sd (version 5.2.9-1.1) are on the same 
machine, a Centos 5.7x86_64 OS.

The client machine is a SLES 10 SP2 (i586) that runs bacula-fd version 5.0.3

The client runs a backup job that has a Run Before Job task that takes 
about 45 minutes to complete (an oracle dump). This is the errror that appears 
right after the completion of the Run Before Job

===

05-Sep 10:05 backup-dir JobId 20409: Start Backup JobId 20409, 
Job=job-backup-eti-db-db-full-oracle.2012-09-05_10.05.23_04
05-Sep 10:05 backup-dir JobId 20409: Using Device 
eti-db-storage-device-db-full-oracle
05-Sep 10:05 eti-db-fd JobId 20409: shell command: run ClientRunBeforeJob 
/opt/backup/do_bk_ALL.sh
05-Sep 10:05 eti-db-fd JobId 20409: ClientRunBeforeJob: 
05-Sep 10:05 eti-db-fd JobId 20409: ClientRunBeforeJob:Export: Release 
11.1.0.6.0 - Production on Wed Sep 5 10:05:26 2012
...
...
...

05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: . exporting dimensions
05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: . exporting post-schema 
procedural objects and actions
05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: . exporting user 
history table
05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: . exporting default and 
system auditing options
05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: . exporting statistics
05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: Export terminated 
successfully with warnings.
05-Sep 10:39 eti-db-fd JobId 20409: ClientRunBeforeJob: 0
05-Sep 10:55 eti-db-fd JobId 20409: Fatal error: Bad response from stored to 
open command
05-Sep 10:55 backup-dir JobId 20409: Error: Bacula backup-dir 5.2.9 (11Jun12):
  Build OS:   x86_64-redhat-linux-gnu redhat 
  JobId:  20409
  Job:    
job-backup-eti-db-db-full-oracle.2012-09-05_10.05.23_04
  Backup Level:   Full
  Client: eti-db-fd 5.0.3 (04Aug10) i686-pc-linux-gnu,suse,10
  FileSet:    eti-db-db-full-oracle 2011-11-11 18:10:03
  Pool:   pool-full-eti-db-db-full-oracle (From Job FullPool 
override)
  Catalog:    MyCatalog (From Client resource)
  Storage:    eti-db-storage-db-full-oracle (From Job resource)
  Scheduled time: 05-Sep-2012 10:04:49
  Start time: 05-Sep-2012 10:39:31
  End time:   05-Sep-2012 10:55:04
  Elapsed time:   15 mins 33 secs
  Priority:   10
  FD Files Written:   0
  SD Files Written:   0
  FD Bytes Written:   0 (0 B)
  SD Bytes Written:   0 (0 B)
  Rate:   0.0 KB/s
  Software Compression:   None
  VSS:    no
  Encryption: no
  Accurate:   no
  Volume name(s): 
  Volume Session Id:  365
  Volume Session Time:    1346234052
  Last Volume Bytes:  1 (1 B)
  Non-fatal FD errors:    0
  SD Errors:  0
  FD termination status:  Error
  SD termination status:  Error
  Termination:    *** Backup Error ***
 
===

The DIR, SD and FD have Heartbeat Interval = 60
 
===

[root@backup ~]# grep '' /proc/sys/net/ipv4/tcp_keepalive_*
/proc/sys/net/ipv4/tcp_keepalive_intvl:75
/proc/sys/net/ipv4/tcp_keepalive_probes:9
/proc/sys/net/ipv4/tcp_keepalive_time:7200
 
 
ETI-DB:~ # grep '' /proc/sys/net/ipv4/tcp_keepalive_*
/proc/sys/net/ipv4/tcp_keepalive_intvl:75
/proc/sys/net/ipv4/tcp_keepalive_probes:9
/proc/sys/net/ipv4/tcp_keepalive_time:7200

===--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Alex Lucas
Dears,

Is there a way to run a complex command or even a script on a client?

So far I have tried two ways and failed:
1) when a command (e.g. in ClientRunBeforeJob) has something like
echo test  /tmp/test.out bacula runs it on the client as echo as
command and the rest as the argument. i.e. there is no /tmp/test.out on
the client
2) when I run test.sh which is in the PATH on the bacula director it
fails, I guess because there is no identical script on the client.

Any suggestions?


Thank you,
Alex

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Christian Manal
On 05.09.2012 12:43, Alex Lucas wrote:
 Dears,
 
 Is there a way to run a complex command or even a script on a client?
 
 So far I have tried two ways and failed:
 1) when a command (e.g. in ClientRunBeforeJob) has something like
 echo test  /tmp/test.out bacula runs it on the client as echo as
 command and the rest as the argument. i.e. there is no /tmp/test.out on
 the client
 2) when I run test.sh which is in the PATH on the bacula director it
 fails, I guess because there is no identical script on the client.
 
 Any suggestions?

Hi,

all the Run-statements execute what is defined directly, without a
shell. So output redirection and stuff won't work unless you do
something like this:

   ClientRunBeforeJob = /bin/bash -c 'echo foo /tmp/foo.out'

If you want to call a script, you'd have to define the absolute path or
a relative one from the executing daemon's working directory.


Regards,
Christian Manal

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Jérôme Blion
Le 05/09/2012 12:43, Alex Lucas a écrit :
 Dears,

 Is there a way to run a complex command or even a script on a client?

 So far I have tried two ways and failed:
 1) when a command (e.g. in ClientRunBeforeJob) has something like
 echo test  /tmp/test.out bacula runs it on the client as echo as
 command and the rest as the argument. i.e. there is no /tmp/test.out on
 the client
 2) when I run test.sh which is in the PATH on the bacula director it
 fails, I guess because there is no identical script on the client.

 Any suggestions?


 Thank you,
 Alex


Hello,

Client Run Before Job will run a command on the client ! Run Before 
Job will run on the director.

HTH.
Jérôme Blion.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread dweimer
On 2012-09-05 05:43, Alex Lucas wrote:
 Dears,

 Is there a way to run a complex command or even a script on a client?

 So far I have tried two ways and failed:
 1) when a command (e.g. in ClientRunBeforeJob) has something like
 echo test  /tmp/test.out bacula runs it on the client as echo as
 command and the rest as the argument. i.e. there is no /tmp/test.out 
 on
 the client
 2) when I run test.sh which is in the PATH on the bacula director 
 it
 fails, I guess because there is no identical script on the client.

 Any suggestions?


 Thank you,
 Alex

 
 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. 
 Discussions
 will include endpoint security, mobile security and the latest in 
 malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users

Yes, use the Client Run Before Job, and point it to a shell script 
that exists on the client.  I use this method on my FreeBSD machines to 
create UFS snapshots, and mount them as read only, so I can backup the 
snapshots to get any open files in a consistent state, then unmount and 
delete the snapshots with a Client Run After Job script.  Works like a 
charm, I also have some machines running PostgreSQL dumps to disk, and 
one running an RYSNC job, using echo commands or verbose switches within 
the scripts allows you to output important information into the Bacula 
console log so that you can easily see that the script ran successfully 
when checking your backup jobs.

-- 
Thanks,
Dean E. Weimer
http://www.dweimer.net/

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] cycle rotation

2012-09-05 Thread Tony Peña
Hi to all list.


I need to change my rotation of backup... now till today i use tapelibrary
only for save... but i add storage file and i want to recover more faster
than tape...
so i need this situation... how can i do daily or weekly cycle hours
section in bacula-dir to can do this scenario: today, yesterday and 2 days
ago, keep backup on hdd storage, and starting 4th day back to 1 year go to
tape... ?

At 4th day when rotate in storage file, not prune else, send that info into
tape to start 1 year rotation and 365day of that then prune.

other thing... i have some jobgs stuck.. waiting excecution,.. what is that?

54875 Increme  Backup_MySQLcluster_1.2012-09-05_02.05.01_16 is waiting
execution

and in other jobs have this..

IncrementalBackup10  06-Sep-12 02:05Backup MySQLcluster 1 EVA
*unknown*, like bacula storage don't know the volume to use...

some ideas to fix this.. i try to make storage file retention just 2 days
and continues showing that.

thanxs in advance.


-- 
Antonio Peña
Secure email with PGP 0x8B021001 available at http://pgp.mit.edu
Fingerprint: 74E6 2974 B090 366D CE71  7BB2 6476 FA09 8B02 1001
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula 5.2.10 on Windows 2008 R2 server : 1 MByte/sec transfer rate, very slow

2012-09-05 Thread lst_hoe02

Zitat von Paul Van Wambeke paul.vanwamb...@br.fgov.be:

 On 5/09/2012 02:52, James Harper wrote:
   Hi

 I have Bacula 5.01 Director installed on a Linux Ubuntu 10.04 server, and a
 Bacula 5.2.10 Client (Bacula-fd) running on a Windows Server 2008
 R2 SP1 server, with Hyper-V role installed. Purpose is her to  
 backup the host
 server, not the virtual machines.

 Initially the backup transfer rate was extremely slow (kbytes/sec).
 Changing the Network adapter (Broadcom NetXstreme 5714) settings to
 Large end Offload (LSO) = off as suggested in some posts increased the
 transfer rate to 1MB/sec, which is still 10 to 80 times slower  
 than the transfer
 rates I have with other servers running Linux or Windows 7.  
 Transferring a file
 'by hand' over the net runs at 80 MB/sec ...So I suspect a problem with
 Bacula-fd.

 Any idea how to configure the server so that I can get decent  
 backup transfer
 speeds ? I can't imagine these servers can't be managed by Bacula.

 First use something like iperf to make sure that the problem is not  
 bacula. Test all possible combinations of send/receive for the  
 following:

 . host server
 . bacula sd server
 . another pc/server that is separate (can be linux or windows)

 That should give you concrete evidence as to whether the problem is  
 related to bacula. Hyper-V network can be terribly difficult in  
 some cases.

 James




 -
 Aucun virus trouve dans ce message.
 Analyse effectuee par AVG - www.avg.fr
 Version: 2012.0.2197 / Base de donnees virale: 2437/5249 - Date: 04/09/2012




 Thanks James for the suggestion.

 I have made the performance tests : copying a file from the host server
 to another Windows 7 PC was done at 80MBytes/sec.

 Using iperf I measured following performances :

 bacula-fd = the windows server 2008 R2 host, 1Gb/sec NIC
 bacula-dir = a linux ubuntu 10.04 PC, 1 100Mb/sec NIC
 bacula-sd = a linux ubuntu 10.04 server, 1 Gbite/sec NIC


 iperf serveriperf clientPerformance
 --- 

 bacula-fdbacula-dir10 MBytes/sec
 bacula-fdbacula-sd111 MBytes/sec
 bacula-dirbacula-fd10 MBytes/sec
 bacula-sdbacula-fd 26 MBytes/sec

 So normally the bacula client should be able to write to the bacula
 storage at 26MBytes/sec ?


That's a little bit asymetric, no? If you got 111MBytes/sec in one  
direction and 26MBytes/sec the other way around i would suspect  
something like duplex mismatch or the like. Have you check if your  
switch and the nic agree on speed and duplex settings to use?

Regards

Andreas



--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] missing bacula conf files

2012-09-05 Thread Tim Dunphy
Hello,

 I'm trying to setup bacula-director  2.4.4  under centos 5.6 on a linux
vm.

 I'm following instructions that are telling me to modify a couple of files
that don't appear to be on my system after searching for them using both
find and the locate command:

 /etc/bacula/tray-monitor.conf

/etc/bacula/bconsole.conf

 I've installed the various components via yum and these are the packages I
have installed:

 [root@cloud:~] #rpm -qa | grep bacula
bacula-docs-2.4.4-5.el5
bacula-director-mysql-2.4.4-10.el5
bacula-storage-common-2.4.4-10.el5
bacula-director-common-2.4.4-10.el5
bacula-storage-mysql-2.4.4-10.el5
bacula-console-2.4.4-10.el5
bacula-common-2.4.4-10.el5

What I'm wondering is if the reason I'm missing these conf files is because
I haven't installed the correct packages.

I'd appreciate any input you might have on this.

Thanks!
Tim

-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] newbie - problem labeling / adding tapes to pool

2012-09-05 Thread Simon Tyler
Hello,

I'm having some issues with bacula.

This is a new install, I have not used bacula before. So far I've
successfully backed up from a client to a file on the bacula server, now
I'm trying to get autoloader working so I can backup to tape. I want to
make it so all tapes or Volumes are a member of Default Pool.

I'm trying to label tapes and set them up so they're available in a Pool
for backups. It appears that two slots are not recognized as containing
bacula tapes and I'm not sure how to fix that. I think almost all of the
tapes were used in our previous backup solution, so I don't know why these
two slots are misbehaving. If I try the label barcodes command, it offers
to label slots 1-6, and 8, but not the tapes in mystery slots 6 and 7.

Please let me know if I can supply more information, or if I should be
posting somewhere else.

Regards,

Simon


command output:
=
**status slots storage*
The defined Storage resources are:
 1: File
 2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger slots command.
Device HP-0 has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger list command.
 Slot |   Volume Name|   Status  | Media Type   |
Pool  |
--+--+---+--+|
1 | TPMBU011 |Append |LTO-4 |
Default |
2 | TPMBU002 |Append |LTO-4 |
Default |
3 | TPMBU001 |Append |LTO-4 |
Default |
4 | TPMBU005 |Append |LTO-4 |
Default |
5 | TPMBU007 |Append |LTO-4 |
Default |
6*|  | ? |?
|  ? |
7*|  | ? |?
|  ? |
8 | TPMBU003 |Append |LTO-4 |
Default |

**label barcodes*
The defined Storage resources are:
 1: File
 2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger slots command.
Device HP-0 has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger list command.
The following Volumes will be labeled:
Slot  Volume
==
   1  TPMBU011
   2  TPMBU002
   3  TPMBU001
   4  TPMBU005
   5  TPMBU007
   8  TPMBU003


Details:

-CentOS 5.8
-Bacula 5.2.6
-Autochanger test successful
-tape drive is an HP G2 Autoloader with 1 drive, 8 slots
-there are 8 tapes in the Autoloader


*Simon Tyler * |  Systems Administrator
TPM Communications  |  416-408-2727  x286

si...@tpmcomm.com
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread Alex Lucas
On 05/09/12 19:24, Christian Manal wrote:
 On 05.09.2012 12:43, Alex Lucas wrote:
 Dears,

 Is there a way to run a complex command or even a script on a client?

 So far I have tried two ways and failed:
 1) when a command (e.g. in ClientRunBeforeJob) has something like
 echo test  /tmp/test.out bacula runs it on the client as echo as
 command and the rest as the argument. i.e. there is no /tmp/test.out on
 the client
 2) when I run test.sh which is in the PATH on the bacula director it
 fails, I guess because there is no identical script on the client.

 Any suggestions?
 Hi,

 all the Run-statements execute what is defined directly, without a
 shell. So output redirection and stuff won't work unless you do
 something like this:

ClientRunBeforeJob = /bin/bash -c 'echo foo /tmp/foo.out'
Thank you, this does it. One related question: is because I have a few
commands to run, is there a way to make the commands split across
several lines (for readability) ?

e.g.

ClientRunBeforeJob = /bin/bash -c 'command one
  command two'

doesn't seem to work.


 If you want to call a script, you'd have to define the absolute path or
 a relative one from the executing daemon's working directory.


 Regards,
 Christian Manal

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and 
 threat landscape has changed and how IT managers can respond. Discussions 
 will include endpoint security, mobile security and the latest in malware 
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users



--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] newbie - problem labeling / adding tapes to pool

2012-09-05 Thread ganiuszka
W dniu 06.09.2012 00:37, Simon Tyler pisze:
 Hello,

 I'm having some issues with bacula.

 This is a new install, I have not used bacula before. So far I've
 successfully backed up from a client to a file on the bacula server, now
 I'm trying to get autoloader working so I can backup to tape. I want to
 make it so all tapes or Volumes are a member of Default Pool.

 I'm trying to label tapes and set them up so they're available in a Pool
 for backups. It appears that two slots are not recognized as containing
 bacula tapes and I'm not sure how to fix that. I think almost all of the
 tapes were used in our previous backup solution, so I don't know why
 these two slots are misbehaving. If I try the label barcodes command,
 it offers to label slots 1-6, and 8, but not the tapes in mystery slots
 6 and 7.

 Please let me know if I can supply more information, or if I should be
 posting somewhere else.

Hi,

It means that probably there is problem with reading tape labels in 
slots 6 and 7. Are you sure that tapes in slots 6 and 7 have sticked 
correct labels?

Could you show us output from below commands?

mtx -f /dev/sgX status

(/dev/sgX is special file of changer device)

and from mtx-changer Bacula script:

mtx-changer /dev/sgX list

(/dev/sgX is special file of changer device).

Regards.
gani


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Running complex commands or scripts remotely on a client

2012-09-05 Thread ganiuszka
W dniu 06.09.2012 03:23, Alex Lucas pisze:
 On 05/09/12 19:24, Christian Manal wrote:
 On 05.09.2012 12:43, Alex Lucas wrote:
 Dears,

 Is there a way to run a complex command or even a script on a client?

 So far I have tried two ways and failed:
 1) when a command (e.g. in ClientRunBeforeJob) has something like
 echo test  /tmp/test.out bacula runs it on the client as echo as
 command and the rest as the argument. i.e. there is no /tmp/test.out on
 the client
 2) when I run test.sh which is in the PATH on the bacula director it
 fails, I guess because there is no identical script on the client.

 Any suggestions?
 Hi,

 all the Run-statements execute what is defined directly, without a
 shell. So output redirection and stuff won't work unless you do
 something like this:

 ClientRunBeforeJob = /bin/bash -c 'echo foo /tmp/foo.out'
 Thank you, this does it. One related question: is because I have a few
 commands to run, is there a way to make the commands split across
 several lines (for readability) ?

 e.g.

 ClientRunBeforeJob = /bin/bash -c 'command one
command two'

 doesn't seem to work.

Hi,

It works for me. Did you try to use semicolon character for separate 
elementary commands?

Example:

ClientRunBeforeJob = /bin/bash -c 'echo aaa /tmp/foo1.out; echo bbb  
/tmp/foo2.out'

Regards.
gani

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users