From e1e97fe8f100468c2875068ce09107bdaa299f88 Mon Sep 17 00:00:00 2001 From: alin104n Date: Mon, 29 May 2017 13:31:18 +0300 Subject: [PATCH] Dbsmerge Naming error fix --- data/scripts/migrator/dbsmerge_mongo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/scripts/migrator/dbsmerge_mongo.py b/data/scripts/migrator/dbsmerge_mongo.py index c492c7af6..b404f9d2f 100755 --- a/data/scripts/migrator/dbsmerge_mongo.py +++ b/data/scripts/migrator/dbsmerge_mongo.py @@ -8,14 +8,14 @@ from_host = '127.0.0.1' from_port = '27017' -from_db = '11' +from_db = '10' from_auth_db = 'cgrates' # Auth db on source server from_user = 'cgrates' from_pass = '' -to_host = 'localhost' +to_host = '127.0.0.1' to_port = '27017' -to_db = '10' +to_db = '11' to_auth_db = "cgrates" # Auth db on target server to_user = 'cgrates' to_pass = '' @@ -51,7 +51,7 @@ if from_host == to_host and from_port == to_port: i += 1 print('Moving colection %s (%d of %d)...' % (col, i, len(cols))) try: - client.admin.command(OrderedDict([('renameCollection', from_db + '.' + col), ('to', to_db + '.' + col), ('dropTarget', to_drop_target)])) + client.admin.command(OrderedDict([('renameCollection', from_db + '.' + col), ('to', to_db + '.' + col), ('dropTarget', drop_target)])) except: e = sys.exc_info()[0] print(e)