
Dependencies:
[dependencies]
async-trait = "0.1.80"
mongodb = { version = "2.8.2", features = ["bson-chrono-0_4"] }
tokio = { version = "1.38.0", features = ["rt", "rt-multi-thread", "macros"] }
chrono = "0.4.38"
futures = "0.3.30"
Usage:
use mongo_data_exporter::export;
use mongo_data_exporter::operations::{MongoDBConnection, Operation};
#[tokio::main]
async fn main() {
let source_db_dr = MongoDBConnection::new("mongodb://localhost:27017/test", "test", "test-collection").await;
let target_db_dr = MongoDBConnection::new("mongodb://localhost2:27017/test", "test", "test-collection").await;
let mut export_dr = export::Export::init(source_db_dr, target_db_dr, 10000, None).await;
export_dr.start_export().await;
}
License
This project is licensed under either of the following licenses, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or [http://www.apache.org/licenses/LICENSE-2.0])
- MIT license (LICENSE-MIT or [http://opensource.org/licenses/MIT])