(adding puppet-users@ back in case others have better information on handling filebuckets)

On 12/20/2013 12:53 AM, Harshita Sinha wrote:
Dear Jeff,

Thanks for your guidance.
Basically I want to achieve sending files from Windows to unix.

I missed "push the file from windows to unix" in your original email, my apologies.

In that case, I propose the following (reference http://docs.puppetlabs.com/references/latest/type.html#filebucket)

## site.pp

filebucket { 'main':
  path => false,
}

File { backup => 'main', }

node default {
  file { 'D:\Puppet\Anshita.txt':
    ensure => 'file',
  }
}


This should back up Anshita.txt IF there is a change. I don't know how it will work when the content isn't specified, but if filebucket will work for you at all in this, that will work. Now here is the problem: filebucket, being designed for large deployments, does not simply store the file in a directory on puppetmaster where it's easy to get to, but in /var/lib/puppet/bucket by md5 sum. To retrieve the file you will Instead need to use the puppet filebucket command as

find /var/lib/puppet/bucket/ -name paths | xargs grep Anshita.txt
to get the md5sum of the file, then
puppet filebucket restore /tmp/Anshita.txt (md5sum from previous)

Things to note:
You cannot specify *path* for the remote filebucket. This is an explicit limitation. You must still have a *file* resource in the node definition for your Windows agent, or Puppet will be unaware of the file to back it up. You do not need to specify your server in the filebucket statement unless it is different than your puppetmaster. My command for finding the md5 of the file (*find...xargs*) is for Puppet community edition, not Puppet Enterprise.

Jeff

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52B45B12.8030804%40bericotechnologies.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to