Skip to content

Commit

Permalink
Actually drop mongo database
Browse files Browse the repository at this point in the history
The echo command we were using wasn't actually dropping the mongo
database, but rather echoing 'db.dropDatabase();' | mongo pulp_database

This resulted in data being restored on an existing database.

So the mongo database stayed during restore. We didn't notice many issues
because not much is in the mongo database on a clean satellite install.

Fixes #259
  • Loading branch information
John Mitsch committed Nov 30, 2017
1 parent be5225d commit bf3eff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/satellite-clone/tasks/restore_mongo_dump.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Drop old mongo database
command: echo 'db.dropDatabase();' | mongo pulp_database
command: mongo pulp_database --eval "db.dropDatabase()"

- name: Restore new mongo data
command: mongorestore --host localhost {{ backup_dir }}/mongo_dump/pulp_database/

0 comments on commit bf3eff7

Please sign in to comment.