Beispiel #1
0
        private static void Execute(FlexibleOptions options)
        {
            logger.Debug("Start");

            // Parsing Arguments - Sanity Check
            ParseArguments(options);

            logger.Debug("Opening connections...");

            CheckConnections(options);

            // Reaching Databases
            MongoServer sourceDatabase = MongoDbContext.GetServer(options.Get("source"));
            MongoServer targetDatabase = MongoDbContext.GetServer(options.Get("target"));

            // process list
            logger.Debug("Start migrating data...");

            Migrator.DatabaseCopy(sourceDatabase, targetDatabase, _sourceDatabases, _targetDatabases, _collections, _insertBatchSize, _copyIndexes, _dropCollections, _threads, options);

            System.Threading.Thread.Sleep(1000);

            logger.Debug("Done migrating data!");
        }