Last active
November 26, 2024 03:44
-
-
Save hoangdh/2fd1860c17b1dd75cbcdd2edc5961d4d to your computer and use it in GitHub Desktop.
Revisions
-
hoangdh revised this gist
Feb 19, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ ## Migrate data MongoDB to another cluster - Source cluster: 10.10.10.10 - Destination cluster: 10.10.20.10 ``` mongodump --host 10.10.10.10 --port 27017 --archive --numParallelCollections=10 | \ -
hoangdh revised this gist
Feb 19, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ mongodump --host 10.10.10.10 --port 27017 --archive --numParallelCollections=10 mongorestore --host 10.10.20.10 --port 27017 --archive --numParallelCollections=10 --drop ``` **Note:** Use `--gzip` to save bandwidth. ``` mongodump --host 10.10.10.10 --port 27017 --archive --gzip --numParallelCollections=10 | \ -
hoangdh revised this gist
Feb 19, 2024 . 2 changed files with 16 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ ## Migrate data MongoDB to another cluster Source cluster: 10.10.10.10 Destination cluster: 10.10.20.10 ``` mongodump --host 10.10.10.10 --port 27017 --archive --numParallelCollections=10 | \ mongorestore --host 10.10.20.10 --port 27017 --archive --numParallelCollections=10 --drop ``` **Note:** Use `--gzip` to save bandwith. ``` mongodump --host 10.10.10.10 --port 27017 --archive --gzip --numParallelCollections=10 | \ mongorestore --host 10.10.20.10 --port 27017 --archive --gzip --numParallelCollections=10 --drop ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +0,0 @@ -
hoangdh created this gist
Feb 19, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ## Streaming backup MongoDB to another cluster ``` mongodump --host 10.10.10.10 --port 27017 --archive --gzip --numParallelCollections=10 | \ mongorestore --host 10.10.20.10 --port 27017 --archive --gzip --numParallelCollections=10 --drop ```