On Monday, November 17, 2014 12:32:44 PM UTC-6, Seokhee Kim wrote: > > Hi, > We have some special case to use Puppet which need to sync many and many > files but just few files are updated ( delete, created or updated ). > Is there any way to sync just for changed files? now I am syncing whole > dir with purge option. > And I realized it's getting slower and slower based on number of files. > So it looks like syncing changed list would be good idea. > > The cost of such an operation must scale with the number of files, unless you know in advance of each run, through some out-of-band mechanism, what updates need to be performed. If you don't know that then you have no alternative but to touch or at least examine every one, either to determine whether it needs to be updated or to blindly overwrite it. You can make that *cheaper* by various means, such as changing the Files' 'checksum' parameter or managing the files via rsync instead, but such options still scale the same way.
There is in fact a way to scale with the number of changes instead of with the number of files, however: manage the files via a version-control system (git, svn, mercurial, etc.) instead of directly via Puppet. This has overhead in the form of disk space, of course, and Puppet will not be able to report as precisely on changes performed. Also you will not be able to have Puppet relationships with individual files from the collection, because they are not represented to Puppet as individual resources. John -- 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/19006768-e051-46a8-9541-16d11fb6b2b9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.