Skip to content

Instantly share code, notes, and snippets.

@mccun934
Created May 12, 2017 21:02
Show Gist options
  • Save mccun934/9ccd16fa2e1e213be608d7dbe4c56fd8 to your computer and use it in GitHub Desktop.
Save mccun934/9ccd16fa2e1e213be608d7dbe4c56fd8 to your computer and use it in GitHub Desktop.
reset capsule's mongo database for a resync
#!/bin/bash
set -x
katello-service stop
systemctl start mongod
rm -rf /var/lib/pulp/content/units/*
rm -rf /var/lib/pulp/published/*
rm -rf /var/lib/pulp/importers/*
mongo pulp_database --eval "db.dropDatabase()"
sudo -u apache pulp-manage-db
katello-service restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment