/
Drop and Prime Database
Drop and Prime Database
On the linux shell, run the below.
mongo use opaddress db.dropDatabase() exit /usr/local/omk/bin/opaddress-cli.pl act=setup-db
And that should be all you need to do. As long as the database exists, opAddress will prime it with any required data.
Example console output doing that is below (with added show dbs to show the registered databases along with their sizes).
mark@dev:~$ mongo MongoDB shell version v3.4.24 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.24 Server has startup warnings: 2021-10-14T18:10:22.745+1000 I STORAGE [initandlisten] 2021-10-14T18:10:22.745+1000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2021-10-14T18:10:22.745+1000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2021-10-14T18:10:24.881+1000 I CONTROL [initandlisten] 2021-10-14T18:10:24.882+1000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2021-10-14T18:10:24.882+1000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. 2021-10-14T18:10:24.882+1000 I CONTROL [initandlisten] > show dbs admin 0.000GB local 0.000GB nmisng 0.011GB opaddress 0.004GB > use opaddess switched to db opaddess > db.dropDatabase() { "dropped" : "opaddress", "ok" : 1 } > show dbs admin 0.000GB local 0.000GB nmisng 0.011GB > exit bye mark@dev:~$ /usr/local/omk/bin/opaddress-cli.pl act=setup-db mark@dev:~$ mongo MongoDB shell version v3.4.24 connecting to: mongodb://127.0.0.1:27017 MongoDB server version: 3.4.24 Server has startup warnings: 2021-10-14T18:10:22.745+1000 I STORAGE [initandlisten] 2021-10-14T18:10:22.745+1000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2021-10-14T18:10:22.745+1000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2021-10-14T18:10:24.881+1000 I CONTROL [initandlisten] 2021-10-14T18:10:24.882+1000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2021-10-14T18:10:24.882+1000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. 2021-10-14T18:10:24.882+1000 I CONTROL [initandlisten] > show dbs admin 0.000GB local 0.000GB nmisng 0.011GB opaddress 0.001GB > exit bye
, multiple selections available,
Related content
Upgrading to MongoDB 3.2 Using Wired Tiger
Upgrading to MongoDB 3.2 Using Wired Tiger
More like this
Upgrading From MongoDB 3.0 to MongoDB 3.2
Upgrading From MongoDB 3.0 to MongoDB 3.2
More like this
Ubuntu - Process for Upgrading MongoDB 4.2 Standalone to MongoDB 6.0 Standalone
Ubuntu - Process for Upgrading MongoDB 4.2 Standalone to MongoDB 6.0 Standalone
More like this
Debian - Process for Upgrading MongoDB 4.2 Standalone to MongoDB 6.0 Standalone
Debian - Process for Upgrading MongoDB 4.2 Standalone to MongoDB 6.0 Standalone
More like this
Ubuntu - Process for Upgrading MongoDB 3.4 Standalone to MongoDB 4.2 Standalone
Ubuntu - Process for Upgrading MongoDB 3.4 Standalone to MongoDB 4.2 Standalone
More like this
MongoDB Data Migration, Backup and Restore
MongoDB Data Migration, Backup and Restore
More like this