[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copying files back to the server

From: Ed Brown
Subject: Re: copying files back to the server
Date: Tue, 15 Feb 2005 14:24:44 -0700

Check out the rules regarding iteration ( at:
In a 'copy:' action, list variables can be iterated over in the
'server=' field, and the source or from field (not the destination
field).  I haven't done what you are trying, but in my experience with
iteration in other actions, you can get surprising results by using two
list variables in an action.  That is, it might attempt 9 copy actions
with 2 list variables with 3 values (3X3).  You might just avoid using
the filename in the copy action, instead do a directory to directory

Of course you have to be running cfservd on the slave servers, with
properly configured access control...


On Tue, 2005-02-15 at 12:43, Erik Dykema wrote:
> Hi-
>       I have an interesting problem which I haven't been able to find the 
> answer to 
> in the documentation...
>       I have a fairly typical setup where there is a 'master' server and a 
> number of 
> 'slave' servers, which update and get configuration data from the master.
>       The slaves also run scripts and produce output files (for example 
> "up2date -u > 
> /output/hostnameoutput.txt").
>       I'd like an easy way to get this output file back to the master, for 
> processing 
> by a web server.  I figured out how to do it by exporting the file via NFS on 
> the slaves, or by exporting a Read/Write directory on the master, or by means 
> of 
> some webserver tricks, but what I'd really like to do is something like a 
> copy 
> statement of the following:
> # Imaginary code tidbit
> slavehostnames = ( slave1 slave2 slave3 )
> copy:
>       masterserver::
>               /output/$(slavehostnames)output.txt
>                       dest=/from_slaves/$(slavehostnames)output.txt
>                       server= slavehostnames
> # End imaginary code
>       Which would cause the master server to copy from the slave servers 
> their files, 
> such that it would copy:
>       from slave1 /output/slave1output.txt to /from_slaves/slave1output.txt
>       from slave2 /output/slave1output.txt to /from_slaves/slave2output.txt
>       from slave3 /output/slave1output.txt to /from_slaves/slave3output.txt
>       Does this make sense?  Can it be done?
> thanks,
> Erik
> _______________________________________________
> Help-cfengine mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]