Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--purge option should include other objects #118

Open
haidangwa opened this issue Feb 19, 2018 · 0 comments
Open

--purge option should include other objects #118

haidangwa opened this issue Feb 19, 2018 · 0 comments

Comments

@haidangwa
Copy link

haidangwa commented Feb 19, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant