[Trunk | Admin tools]: synchronize_dbs.js & migrateCommunityIn_db.js: Add auth commands for dbs with credentials.

This commit is contained in:
Konstantina Galouni 2020-12-04 09:41:00 +00:00
parent 7db56cee72
commit f3a33d9044
2 changed files with 30 additions and 2 deletions

View File

@ -3,7 +3,9 @@ print("migrateCommunityIn_db script running...");
function migrate_portal(portalPid, beta_db_name, prod_db_name) {
beta_db = db.getSiblingDB(beta_db_name);
// db.auth("your_username", "your_password");
prod_db = db.getSiblingDB(prod_db_name);
// db.auth("your_username", "your_password");
print("migrate_portal: "+portalPid+" - both dbs are here");
@ -193,5 +195,29 @@ function migrate_portal(portalPid, beta_db_name, prod_db_name) {
}
migrate_portal("egi", 'admin_beta_test_migration', 'admin_prod_test_migration');
migrate_portal("aginfra", 'openaireconnect_new', 'openaireconnect');
migrate_portal("rural-digital-europe", 'openaireconnect_new', 'openaireconnect');
migrate_portal("clarin", 'openaireconnect_new', 'openaireconnect');
migrate_portal("enermaps", 'openaireconnect_new', 'openaireconnect');
// migrate_portal("ifremer", 'openaireconnect_new', 'openaireconnect');
migrate_portal("instruct", 'openaireconnect_new', 'openaireconnect');
migrate_portal("risis", 'openaireconnect_new', 'openaireconnect');
migrate_portal("rda", 'openaireconnect_new', 'openaireconnect');
migrate_portal("science-innovation-policy", 'openaireconnect_new', 'openaireconnect');
// migrate_portal("sobigdata", 'openaireconnect_new', 'openaireconnect');
migrate_portal("sdsn-gr", 'openaireconnect_new', 'openaireconnect');
migrate_portal("elixir-gr", 'openaireconnect_new', 'openaireconnect');
migrate_portal("beopen", 'openaireconnect_new', 'openaireconnect');
// migrate_portal("euromarine", 'openaireconnect_new', 'openaireconnect');
migrate_portal("oa-pg", 'openaireconnect_new', 'openaireconnect');
migrate_portal("covid-19", 'openaireconnect_new', 'openaireconnect');
migrate_portal("dariah", 'openaireconnect_new', 'openaireconnect');
migrate_portal("dh-ch", 'openaireconnect_new', 'openaireconnect');
migrate_portal("egi", 'openaireconnect_new', 'openaireconnect');
migrate_portal("mes", 'openaireconnect_new', 'openaireconnect');
migrate_portal("epos", 'openaireconnect_new', 'openaireconnect');
migrate_portal("fam", 'openaireconnect_new', 'openaireconnect');
migrate_portal("ni", 'openaireconnect_new', 'openaireconnect');

View File

@ -19,7 +19,9 @@ print("synchronization of DBs script running...");
function keep_Beta_Production_DBs_synchronized(beta_db_name, production_db_name) {
beta_db = db.getSiblingDB(beta_db_name);
// db.auth("your_username", "your_password");
prod_db = db.getSiblingDB(production_db_name);
// db.auth("your_username", "your_password");
print("keep_Beta_Production_DBs_synchronized - both dbs ("+beta_db_name+", "+production_db_name+") are here");
@ -160,5 +162,5 @@ function keep_Beta_Production_DBs_synchronized(beta_db_name, production_db_name)
}
keep_Beta_Production_DBs_synchronized("admin_beta_test_migration", "admin_prod_test_migration");
keep_Beta_Production_DBs_synchronized("openaireconnect_new", "openaireconnect");