Search Puppet file bucket for a changed file(s)

When you use Puppet to manage your infrastructure, it’s common to manage several files on a system with a template or something. The default setting when a file is changed, it gets a backup on the client system in a filebucket

You can use to command ‘puppet filebucket’ with a lot of options to hopefully get what you want…. Or…. just search the filesystem 🙂

The location below holds the directory structure were the files are physically stored! with a lot of hashes added 😐

A directory structure could look like this:

The files content and paths hold the magic information about original file and its location. YES!!

Use the following command the search your filebucket to get you’re long lost files back!!

This only works when the file is managed through the ‘file’ resource type.

Files changed by augeas or not to be found here…. Bummer!