Dbsmerge Naming error fix

This commit is contained in:
alin104n
2017-05-29 13:31:18 +03:00
parent cac39a3db0
commit e1e97fe8f1

View File

@@ -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)