How to upload database to

If you want to upload your local db to with, follow the following steps:

Step 1, create 3 scripts file:,,

For, write:

mongodump -h -d meteor -o meteor
#port is 82 because I am running the local meteor at 80
#port should be your local port + 2, so the default would be 3000+2 = 3002

For, write:

meteor mongo --url

For, write:

mongorestore -u client -p $1 -h -db replay_meteor_com meteor/meteor/ --objcheck --drop is the physical server and might be different for your app

Step 2:

#this will export your db into a local file

Step 3:

#output should be
#copy d2f3d2a0-73eb-f641-a41b-e12517cb5a2a to your clipboard

Step 4:

sh d2f3d2a0-73eb-f641-a41b-e12517cb5a2a
#that should get the local file and restore it to the server
#WARNING: it will drop your remote db at


– The ‘d2f3d2a0-73eb-f641-a41b-e12517cb5a2a’ seems to work only once and expires in a minute. So, hurry up

– Pay attention to the server address since they do change from time to time


Day 23, week 3 assessment

Another “self-assessment” in the morning and the code review is already handed back by dansitu. Good job, dansitu. Overall, good. However, I had to look at my old Backbone code to figure out the right syntax… I should really start a new project with Backbone.

Hao and I were extremely efficient with our Node.js sprint and we were done with the extra credit before lunch. Awesome!!! Shawn did some live coding to show us his approach to the Node.js sprint and I loved his coding style. Well structured and with the right amount of code for readability. I should strive for that style.

With an entire afternoon to spare, I managed to spend more time with my meteor app. Made some progress and please refer to another blog post for how to upload database to


Day 21, no more auto publish with

Besides grocery shopping, I finally got rid of autopublish for one of my Meteor projects.

With Meteor, it is incredibly easy to get things up and running. By default, Meteor autopublish everything in your collection to clients. It works perfectly until your collection / database becomes too large to download for the client. I am at this moment now.

It was daunting at the beginning, but I manged to get it through. According to my very limited knowledge, it seemed to work like this:

Step 1, remove autopublish:

meteor remove autopublish

Step 2, at the server side, publish the collection

Meteor.publish('pics_filtered', function(filter){
return Pics.find({day:filter});
Step 3, at the client side, catch the collection.

Pics = new Meteor.Collection('pics');
Session.set('today_filter', 17);
Deps.autorun(function () {
Meteor.subscribe("pics_filtered", Session.get("today_filter"));

Step 4, there is no step 4. It seems like Deps.autorun() was responsible for catch and bind data to the collection at client side. Still not 100% sure though.

I have to vent. Look at the following specifications for JS….

– setMonth Sets the month (0-11) for a specified date according to local time.

– setDate Sets the day of the month (1-31) for a specified date according to local time.