I have a bunch of servers that have two directories on them that need to be in sync. For instance, on the same server I might have /var/path/to/dir1
and /var/path/to/dir2
which could have files and folders underneath of each. I'd like to sync /var/path/to/dir1
and have /var/path/to/dir2
as the "backup".
Does anyone know an efficient way in Puppet to sync these two directories? Would I have to create a custom script to do this and use the exec
method in the Puppet manifest file?
My guess was to create a script to recursively verify the MD5 hash on every file in the primary directory and then verify the files in the second directory with that list. I wasn't sure if there was a way to do this in Puppet natively.