What is file_backup_path?

I noticed the /var/chef/backup folder was getting kinda big. The docs
https://docs.chef.io/config_rb_client.html had this to say about
file_backup_path:

The location in which backup files are stored. If this value is empty,
backup files will be stored in the directory of the target file. Default
value: /var/chef/backup.

What exactly goes in there and why? Do I need to be cleaning it out every
now and then?

Greg

When Chef makes changes to the file system, the files that are changed are
backed up by default. That location is where this backup is stored. They
are there as a fail-safe, in case the changes that were put in place were
made in error. This allows you to recover the previous version of the file.

I've not had the backup cache fill up on me before, but you can tune the
number of backups that are kept per resource. I don't see a way to
configure a backup count globally, but it can be limited on individual
resources using the backup attribute. By default the backup count is set to
5.

File

Remote File

Cookbook File

Template

There may be others I've missed.

Thanks,

Brandon

On Tue, Apr 28, 2015 at 7:09 PM, Greg Barker fletch@fletchowns.net wrote:

I noticed the /var/chef/backup folder was getting kinda big. The docs
https://docs.chef.io/config_rb_client.html had this to say about
file_backup_path:

The location in which backup files are stored. If this value is empty,
backup files will be stored in the directory of the target file. Default
value: /var/chef/backup.

What exactly goes in there and why? Do I need to be cleaning it out every
now and then?

Greg

Very helpful, thank you!

On Tue, Apr 28, 2015 at 7:57 PM, Brandon Raabe brandocorp@gmail.com wrote:

When Chef makes changes to the file system, the files that are changed are
backed up by default. That location is where this backup is stored. They
are there as a fail-safe, in case the changes that were put in place were
made in error. This allows you to recover the previous version of the file.

I've not had the backup cache fill up on me before, but you can tune the
number of backups that are kept per resource. I don't see a way to
configure a backup count globally, but it can be limited on individual
resources using the backup attribute. By default the backup count is set to
5.

File
file Resource

Remote File
remote_file Resource

Cookbook File
cookbook_file Resource

Template
template Resource

There may be others I've missed.

Thanks,

Brandon

On Tue, Apr 28, 2015 at 7:09 PM, Greg Barker fletch@fletchowns.net
wrote:

I noticed the /var/chef/backup folder was getting kinda big. The docs
https://docs.chef.io/config_rb_client.html had this to say about
file_backup_path:

The location in which backup files are stored. If this value is empty,
backup files will be stored in the directory of the target file. Default
value: /var/chef/backup.

What exactly goes in there and why? Do I need to be cleaning it out every
now and then?

Greg