Restore files after Puppet apply the changes

Topic Tools

Sometimes, unknowingly you run the puppet agent which is stopped by some other teammate for some sort of testing which enforce Puppet to apply the changes which are changed in Puppet agent and configured in Puppet Master.


Its really horrible and can creates lots of confusion, issues and conflicts

But No worry at all, just like your Version Control Systems, Puppet do log all the changes for certain time period and manage the reports of all the changes

So here I am going to demonstrate how to restore file through Puppet report.

You need to find these two files which will be stored in /var/lib/puppet/state directory in your puppet agent

  • last_run_summary.yaml
  •  last_run_report.yaml

then fetch the exact message through grep like below :- it will report all the changes

Wowww …you just got all the Filebuckets

You can restore whichever file you need to restore with below command :

That’s it …all the files are restored to the previous version which you are looking for 🙂

Happy Learning …

0 comments… add one

Leave a Comment