Re: [Bacula-users] character substitution / client ip
On 2/5/2011 8:07 AM, Paulo Martinez wrote: Dear List, in the job resource, character substitution like this Write Bootstrap = %c_%n.bsr %c = Client's name %n = Job name is nice to have. What about the ip of the client? Is there a way to get the client ip via such substitution? e.g. Run Before Job = /usr/libexec/bacula/client_onlinestatus %ip No. Why do you want the client ip? -- Dan Langille - http://langille.org/ -- The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] character substitution / client ip
Am 05.02.2011 um 15:52 schrieb Dan Langille: On 2/5/2011 8:07 AM, Paulo Martinez wrote: Dear List, in the job resource, character substitution like this Write Bootstrap = %c_%n.bsr %c = Client's name %n = Job name is nice to have. What about the ip of the client? Is there a way to get the client ip via such substitution? e.g. Run Before Job = /usr/libexec/bacula/client_onlinestatus %ip No. Why do you want the client ip? For checking mobil clients accessibility and for some prejob stuff done in the script, like automatic accounting of successful backups. PM -- The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] character substitution / client ip
On 2/5/2011 2:03 PM, Paulo Martinez wrote: Am 05.02.2011 um 15:52 schrieb Dan Langille: On 2/5/2011 8:07 AM, Paulo Martinez wrote: Dear List, in the job resource, character substitution like this Write Bootstrap = %c_%n.bsr %c = Client's name %n = Job name is nice to have. What about the ip of the client? Is there a way to get the client ip via such substitution? e.g. Run Before Job = /usr/libexec/bacula/client_onlinestatus %ip No. Why do you want the client ip? For checking mobil clients accessibility and for some prejob stuff done in the script, like automatic accounting of successful backups. If you ran the script on the client, wouldn't you already have all this information? -- Dan Langille - http://langille.org/ -- The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] character substitution / client ip
Am 05.02.2011 um 20:54 schrieb Dan Langille: On 2/5/2011 2:03 PM, Paulo Martinez wrote: Am 05.02.2011 um 15:52 schrieb Dan Langille: On 2/5/2011 8:07 AM, Paulo Martinez wrote: Dear List, in the job resource, character substitution like this Write Bootstrap = %c_%n.bsr %c = Client's name %n = Job name is nice to have. What about the ip of the client? Is there a way to get the client ip via such substitution? e.g. Run Before Job = /usr/libexec/bacula/client_onlinestatus %ip No. Why do you want the client ip? For checking mobil clients accessibility and for some prejob stuff done in the script, like automatic accounting of successful backups. If you ran the script on the client, wouldn't you already have all this information? Sure, but with heterogeneous clients, this would complicate things and a central place has some advantages. The script also helps canceling the job if the client is not online (laptops). Well, this is done by the internal timeout ... anyway. Maybe its not quite the best approach, i need to rethink this. PM -- The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] character substitution / client ip
On 2/5/2011 6:17 PM, Paulo Martinez wrote: Am 05.02.2011 um 20:54 schrieb Dan Langille: On 2/5/2011 2:03 PM, Paulo Martinez wrote: Am 05.02.2011 um 15:52 schrieb Dan Langille: On 2/5/2011 8:07 AM, Paulo Martinez wrote: Dear List, in the job resource, character substitution like this Write Bootstrap = %c_%n.bsr %c = Client's name %n = Job name is nice to have. What about the ip of the client? Is there a way to get the client ip via such substitution? e.g. Run Before Job = /usr/libexec/bacula/client_onlinestatus %ip No. Why do you want the client ip? For checking mobil clients accessibility and for some prejob stuff done in the script, like automatic accounting of successful backups. If you ran the script on the client, wouldn't you already have all this information? Sure, but with heterogeneous clients, this would complicate things and a central place has some advantages. The script also helps canceling the job if the client is not online (laptops). Well, this is done by the internal timeout ... anyway. Maybe its not quite the best approach, i need to rethink this. You have the client name... go from there. -- Dan Langille - http://langille.org/ -- The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Character Substitution
Richard Scobie pisze: I have a Client Run After Job which runs a bash script which ends up writing a file on the client, %i_%v.txt It all works except the substitution is not occuring and it is literally writing the file %i_%v.txt. Is this expected? How do you create this file? In Client Run After Job directive %v will not be replaced because it can be replaced only on Director side. So if you has: Client Run After Job = /path/script.sh %i %v than %v will be empty. Regards gani -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Character Substitution
ganiuszka wrote: In Client Run After Job directive %v will not be replaced because it can be replaced only on Director side. So if you has: Client Run After Job = /path/script.sh %i %v than %v will be empty. OK thanks. I actually have the %i_%v inside the shell script, so along with the reason above, it probably explains why %i is not being substituted either. Regards, Richard -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Character substitution changed?
Am Mittwoch, 4. Februar 2009 schrieb Maxime: Hello, It seems that %n character substitution changed from version 2.4.3 to 2.4.4 (%n = Job name). There are 2 directors in production which both have these lines in bacula-dir.conf (in a JobDefs resource): RunAfterJob = /usr/local/bin/bacula_job_status.sh %c %i %e %n %l bacula_job_status.sh is simple, it only does (on both server) : echo $(date +%F) $@ /var/bacula/working/backup_status If I take a look at the backup_status files, they differ : 2.4.3: 2009-02-04 backup02c-fd 132 OK job_backup02c Incremental 2.4.4: 2009-02-04 backup01c-fd 142 OK job_backup01c.2009-02-04_00 Incremental So %n is not substituted the same way. Date is appended in 2.4.4 to the job name. As I also use it for bootstrap file name, it changes everyday and bootstrap files are not usable. same problem here, i'm using jobdefs with client scripts where the name (%n) was used for backup of xen-images (name of the xen machine). Now i must workaround this (remove date with sed). Please change back to 2.4.3 behaviour and provide a new replacement variable with current-date... -- Markus Schulz -- ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users