I can see that the database on mlabs is getting new data and the local is not. By shutting down the service, will this delete the database and purge the data?
$ sudo apt-get purge mongod
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongod
Just to see:
$ mongod
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] MongoDB starting : pid=777 port=777 dbpath=/data/db 64-bit host=ip-777-77-77-7777
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] db version v3.2.8
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] git version: 7777
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 777 6 Jan 2014
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] allocator: tcmalloc
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] modules: none
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] build environment:
2016-08-10T19:33:07.565+0000 I CONTROL [initandlisten] distmod: ubuntu1404
2016-08-10T19:33:07.566+0000 I CONTROL [initandlisten] distarch: x86_64
2016-08-10T19:33:07.566+0000 I CONTROL [initandlisten] target_arch: x86_64
2016-08-10T19:33:07.566+0000 I CONTROL [initandlisten] options: {}
2016-08-10T19:33:07.589+0000 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2016-08-10T19:33:07.589+0000 I CONTROL [initandlisten] dbexit: rc: 100
On the EC2 instance the app still runs fine so far.
Where are the MongoDB database files located, so I can make sure they’ve been removed?
Why don’t you just start a new server? All config and deployment should be automated so it should be quite simple to start a new server, just like you would do when scaling?
Good idea. But there’s a lot more too it than that. I have many files and directories outside of the Meteor directory that have to be manually set up, with permissions etc. Also, I have to change the domain mappings etc. At some point I need to build a script to automate this.
Yeah, should really automate that. Makes it much easier to deal with this kind of situations. Especially if your data is not on the web server like you have now with mlab. Having local files can be ok but also might better be outsourced. Did you connect permanent storage to save those files?
@ramez yes it’s a learning curve and it’s tricky on a production machine, lots of risk added while processing the manual commands. Certainly when there is in general no need for it anymore.