@@ -878,6 +878,54 @@ Replication
878
878
879
879
.. slave-ok, admin-only
880
880
881
+ .. dbcommand:: replSetSyncFrom
882
+
883
+ .. versionadded:: 2.2
884
+
885
+ :option host: Specifies the name and port number of the set member
886
+ that you want *this* member to sync from. Use
887
+ the ``[hostname]:[port]`` form.
888
+
889
+ :dbcommand:`replSetSyncFrom` allows you to explicitly configure
890
+ which host the current :program:`mongod` will pull data from. This
891
+ operation may be useful for testing different patterns and in
892
+ situations where a set member is not syncing from the host you
893
+ want. You may **not** use this command to force a member to sync
894
+ from:
895
+
896
+ - itself.
897
+ - an arbiter.
898
+ - a member that does not build indexes.
899
+ - an unreachable member.
900
+ - a :program:`mongod` instance that is not a member of the same
901
+ replica set.
902
+
903
+ If you attempt to sync from a member that is more than 10 seconds
904
+ behind the current member, :program:`mongod` will return and log a
905
+ warning, but *will* sync from such members.
906
+
907
+ The command has the following prototype form:
908
+
909
+ .. code-block:: javascript
910
+
911
+ { replSetSyncFrom: "[hostname]:[port]" }
912
+
913
+ To run the command in the :program:`mongo` shell, use the following
914
+ invocation:
915
+
916
+ .. code-block:: javascript
917
+
918
+ db.adminCommand( { replSetSyncFrom: "[hostname]:[port]" } )
919
+
920
+ You may also use the :func:`rs.syncFrom()` helper in the
921
+ :program:`mongo` shell, in an operation with the following form:
922
+
923
+ .. code-block:: javascript
924
+
925
+ rs.syncFrom([hostname]:[port])
926
+
927
+ .. slave-ok, admin-only
928
+
881
929
Geospatial Commands
882
930
~~~~~~~~~~~~~~~~~~~
883
931
0 commit comments