stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.63k stars 225 forks source link

Skip Import #73

Open Rockyyost opened 9 years ago

Rockyyost commented 9 years ago

Is there anyway to skip a full import? If I've already most of the data in the destination table and would only like to start the tailing only, how could I do that? I see the command to skip tailing, but is there one to skip full import?

nelhage commented 9 years ago

There's no option to do so, currently. You could force it to skip by populating the mosql_tailers table, which is where MoSQL stores its current progress. We do have a --tail-from option, to start tailing at a specific point, but it doesn't suppress the initial import. It's quite possible that it should, though.

ryanatwork commented 9 years ago

What we do is just alter the postgres table by adding the column we need. Then we just a touch on our mongo table that we need which causes an update and the data comes over.