mongodb - Copy mongo DB from one host to another -
i using following command copy mongodb
live sefver local server
{ copydb: 1, fromhost: my-live-ip, tohost: 127.0.0.1, fromdb: livedb, todb: test_db, slaveok: <bool>, }
but gives me following error
error: line 2: unexpected token :
i using robomongo
ui purpose , connected both live , local mongo dbs
you have 2 ways, documentation shows:
run copydb in admin database of destination server following syntax:
{ copydb: 1, fromhost: <hostname>, fromdb: <database>, todb: <database>, slaveok: <bool>, username: <username>, nonce: <nonce>, key: <key> }
copy remote server authtentication:
if copying remote server , remote server has authentication enabled, must include username, nonce, , key.
here link: http://docs.mongodb.org/manual/reference/command/copydb/
its seems forget authentication info in copybd command
Comments
Post a Comment