Backing up development installation data?
I'm running R.C in development mode by following these instructions:
git clone https://github.com/RocketChat/Rocket.Chat.git cd Rocket.Chat meteor
What I cannot seem to figure out is, where is the data stored and how would one go about backing it up? I am specifically refering to user registration data. That's what I wish to backup.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Go into the .meteor/local directory. Everything should be under there.
Thanks @geekgonecrazy, it's there. :+1:
no problem. Good info to know when working with this. Might need to put together a wiki article for tips like this.
I have an issue which is related to my original question here. It's about migrating the users (etc) to a new location.
Steps:
- I cloned the latest branch to a VPS with same OS and same virtualization, they're set up identically.
- SCP'd my old data from
/home/nodejs/Rocket.Chat/.meteor/local/to the new VPS (thus replacing the files/directories with my data from the old VPS) - Check permissions and ownership of files to make sure they're correct (they are)
- Start the new instance
That's where it goes bad:
the_user@ghost:~/Rocket.Chat$ meteor
[[[[[ ~/Rocket.Chat ]]]]]
=> Started proxy.
=> Started MongoDB.
Unexpected mongo exit code 14. Restarting.
W20150914-08:28:18.013(-4)? (STDERR)
W20150914-08:28:18.016(-4)? (STDERR) /home/the_user/.meteor/packages/meteor-tool/.1.1.4.xvre8c++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:278
W20150914-08:28:18.017(-4)? (STDERR) throw(ex);
W20150914-08:28:18.017(-4)? (STDERR) ^
=> Exited with code: 8
W20150914-08:28:18.151(-4)? (STDERR) Error: connection closed
W20150914-08:28:18.151(-4)? (STDERR) at Object.Future.wait (/home/goychat/.meteor/packages/meteor-tool/.1.1.4.xvre8c++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
W20150914-08:28:18.152(-4)? (STDERR) at [object Object].<anonymous> (packages/meteor/helpers.js:119:1)
W20150914-08:28:18.152(-4)? (STDERR) at [object Object].MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:678:1)
W20150914-08:28:18.152(-4)? (STDERR) at [object Object].Mongo.Collection.(anonymous function) (packages/mongo/collection.js:575:1)
W20150914-08:28:18.152(-4)? (STDERR) at [object Object].Mongo.Collection.(anonymous function) [as update] (packages/dispatch:run-as-user/lib/collection.overwrites.js:51:1)
W20150914-08:28:18.152(-4)? (STDERR) at [object Object].Mongo.Collection.upsert (packages/mongo/collection.js:609:1)
W20150914-08:28:18.152(-4)? (STDERR) at Object.RocketChat.settings.addGroup (packages/rocketchat:lib/settings/server/methods.coffee:45:18)
W20150914-08:28:18.153(-4)? (STDERR) at Package (packages/steffo:meteor-accounts-saml/saml_rocketchat.coffee:1:21)
W20150914-08:28:18.153(-4)? (STDERR) at packages/steffo:meteor-accounts-saml/saml_rocketchat.coffee:1:1
W20150914-08:28:18.153(-4)? (STDERR) at packages/steffo:meteor-accounts-saml/saml_rocketchat.coffee:1:1
W20150914-08:28:18.153(-4)? (STDERR) - - - - -
W20150914-08:28:18.153(-4)? (STDERR) at [object Object].<anonymous> (/home/the_user/.meteor/packages/mongo/.1.1.0.11t75li++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/server.js:609:98)
W20150914-08:28:18.154(-4)? (STDERR) at [object Object].emit (events.js:92:17)
W20150914-08:28:18.154(-4)? (STDERR) at [object Object].<anonymous> (/home/the_user/.meteor/packages/mongo/.1.1.0.11t75li++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:171:15)
W20150914-08:28:18.154(-4)? (STDERR) at [object Object].emit (events.js:98:17)
W20150914-08:28:18.154(-4)? (STDERR) at Socket.<anonymous> (/home/the_user/.meteor/packages/mongo/.1.1.0.11t75li++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:550:12)
W20150914-08:28:18.154(-4)? (STDERR) at Socket.emit (events.js:95:17)
W20150914-08:28:18.154(-4)? (STDERR) at TCP.close (net.js:466:12)
^C
Perhaps I am doing this the wrong way. Do anyone know of a better way to migrate old data for usage on a new instance?
Sorry to be pushy :) but would anybody have a good idea on how to accomplish what I've tried to do, as per what I briefly [tried] to outline in the comment above?
can we add an option under admin to backup?? locally? or remote
@RocketChat/owners can anybody help out with this one? Is it possible to move data from one install to another?
@k0nsl did you create a replication group on the vps? Because just copying alone won't do the trick.
While running meteor if you do: ps aux | grep mongo you should get something like this:
$ ps aux | grep mongo
aaron 1157 0.3 0.2 2791580 39184 s002 S+ 5:30PM 0:01.53 /Users/aaron/.meteor/packages/meteor-tool/.1.1.4.2l3p0l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/mongodb/bin/mongod --bind_ip 127.0.0.1 --smallfiles --port 3001 --dbpath /Users/aaron/Projects/rocketchat/Rocket.Chat/.meteor/local/db --oplogSize 8 --replSet meteor
You'll notice its running on port 3001 and replSet meteor
Pretty sure you have to use the same replSet.
I'd honestly advise using mongodump connecting to it and dumping it. Then do an import.
@IQ2022 refer to: #758 for that existing request. ;)
To export the data from a development DB, you should use mongoexport --host localhost:3001 while the app is still running, so the local mongo is accessible.
http://stackoverflow.com/questions/22020580/how-to-connect-mongodb-clients-to-local-meteor-mongodb