-
Notifications
You must be signed in to change notification settings - Fork 26
Description
It appears that the --purge option only deletes users that are in the backup and not in the chef server being backed up. This should extend to other objects. For example, a system that has gone through modifications and several runs of knife-ec-backup could be left with json files in the backup directory that no longer exist on the chef server. In our case, several hundred chef orgs and nodes were removed from the chef server for being stale (identified by knife-tidy). The files related to these orgs and nodes still remain in our backup path. Subsequent backups will update pertinent objects, but it'll do nothing with the objects that have been removed.
I've found that it deletes most of the objects; only the entire org is not deleted. In the output, below, roles are not deleted, because I believe that no roles needed to be removed.
# grep 'Deleted extra entry' ecbackup_2018-02-18.log|awk -F\/ '{print$2}'|sort|uniq
acls
clients
cookbooks
environments
nodes
This impacts us on a restore in the future, since those objects that have already been deleted from the chef server could potentially be restored from their json files when the organization is restored.