#!/bin/sh
echo 'copying users'
mongoexport -h ds045147.mongolab.com:45147 -d docparse -c users -u docparseAdmin -p $1 | mongoimport -h ds043947.mongolab.com:43947 -d docparse_test  -c users --drop -u docparseTestAdmin -p $2


echo 'copying suppliers'
mongoexport -h ds045147.mongolab.com:45147 -d docparse -c suppliers -u docparseAdmin -p $1 | mongoimport -h ds043947.mongolab.com:43947 -d docparse_test  -c docparseAdmin --drop -u docparseTestAdmin -p $2


echo 'copying customers'
mongoexport -h ds045147.mongolab.com:45147 -d docparse -c customers -u docparseAdmin -p $1 | mongoimport -h ds043947.mongolab.com:43947 -d docparse_test  -c customers --drop -u docparseTestAdmin -p $2


echo 'copying uploads'
mongoexport -h ds045147.mongolab.com:45147 -d docparse -c uploads -u docparseAdmin -p $1 | mongoimport -h ds043947.mongolab.com:43947 -d docparse_test  -c uploads --drop -u docparseTestAdmin -p $2


echo 'copying bills, this might take a while'
echo 'copying bills disabled'
# mongoexport -h ds045147.mongolab.com:45147 -d docparse -c bills -u docparseAdmin -p $1 | mongoimport -h ds043947.mongolab.com:43947 -d docparse_test  -c bills --drop -u docparseTestAdmin -p $2

# echo 'copying bills complete'


echo 'copying invoices'
mongoexport -h ds045147.mongolab.com:45147 -d docparse -c invoices -u docparseAdmin -p $1 | mongoimport -h ds043947.mongolab.com:43947 -d docparse_test  -c invoices --drop -u docparseTestAdmin -p $2

echo 'copying invoices complete'
