|
| 1 | +.. _mcli-om-admin-backup-sync-create-cmd: |
| 2 | + |
| 3 | +============================================= |
| 4 | +mongocli ops-manager admin backup sync create |
| 5 | +============================================= |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +.. include:: /includes/admonitions/admin-requires-global-owner.rst |
| 16 | + |
| 17 | +The ``admin backup sync create`` command creates a new |
| 18 | +:opsmgr:`sync store </reference/glossary/#term-sync-store>`. |
| 19 | +You can also create a sync store using the |
| 20 | +:opsmgr:`API </reference/api/admin/backup/sync/mongoConfigs/create-one-sync-store-configuration/>`. |
| 21 | + |
| 22 | +.. _mcli-om-admin-backup-sync-create-syntax: |
| 23 | + |
| 24 | +Syntax |
| 25 | +------ |
| 26 | + |
| 27 | +.. code-block:: shell |
| 28 | + |
| 29 | + mongocli ops-manager|om admin backup sync create |
| 30 | + [ --assignment ] |
| 31 | + [ --encryptedCredentials ] |
| 32 | + [ --label <tags> ] |
| 33 | + [ --loadFactor <number-of-backup-jobs> ] |
| 34 | + [ --maxCapacityGB <amount-of-data> ] |
| 35 | + --name <sync-store-name> |
| 36 | + [ --output|-o <output-format> ] |
| 37 | + [ --profile|-P <profile-name> ] |
| 38 | + [ --ssl ] |
| 39 | + --uri <hosts> |
| 40 | + [ --writeConcern <write-concern> ] |
| 41 | + |
| 42 | +.. include:: /includes/fact-command-line-help.rst |
| 43 | + |
| 44 | +.. _mcli-om-admin-backup-sync-create-options: |
| 45 | + |
| 46 | +Options |
| 47 | +------- |
| 48 | + |
| 49 | +.. list-table:: |
| 50 | + :widths: 30 10 50 10 |
| 51 | + :header-rows: 1 |
| 52 | + |
| 53 | + * - Option |
| 54 | + - Type |
| 55 | + - Description |
| 56 | + - Required? |
| 57 | + |
| 58 | + |
| 59 | + * - ``--assignment`` |
| 60 | + - |
| 61 | + - Flag that indicates whether this sync store can be |
| 62 | + assigned backup jobs. |
| 63 | + - no |
| 64 | + |
| 65 | + * - ``--encryptedCredentials`` |
| 66 | + - |
| 67 | + - Flag that indicates whether the username and password for this |
| 68 | + sync store were encrypted using the |
| 69 | + :opsmgr:`credentialstool </tutorial/encrypt-user-credentials/>`. |
| 70 | + - no |
| 71 | + |
| 72 | + * - ``--label`` |
| 73 | + - array of strings |
| 74 | + - Array of tags that specify which :opsmgr:`backup jobs |
| 75 | + </reference/glossary/#term-backup-job>` |onprem| can assign |
| 76 | + to which sync stores. If omitted, this |
| 77 | + sync store can only process the backup jobs for projects that |
| 78 | + don't use labels to filter their jobs. |
| 79 | + - no |
| 80 | + |
| 81 | + * - ``--loadFactor`` |
| 82 | + - number |
| 83 | + - Required if more than one snapshot store is in use. |
| 84 | + Number that expresses how much backup work this snapshot store |
| 85 | + should perform compared to another snapshot store. Value must be |
| 86 | + a positive, non-zero integer. |
| 87 | + - no |
| 88 | + |
| 89 | + * - ``--maxCapacityGB`` |
| 90 | + - number |
| 91 | + - Maximum amount of data in GB that this sync store can store. |
| 92 | + - no |
| 93 | + |
| 94 | + * - ``--name`` |
| 95 | + - string |
| 96 | + - Unique name for this sync store. This is also the sync store ID. |
| 97 | + - yes |
| 98 | + |
| 99 | + * - ``--output``, ``-o`` |
| 100 | + - string |
| 101 | + - .. include:: /includes/extracts/fact-basic-options-output.rst |
| 102 | + - no |
| 103 | + |
| 104 | + * - ``--profile``, ``-P`` |
| 105 | + - string |
| 106 | + - Name of the profile where the public and private |
| 107 | + keys for the project are saved. If omitted, uses the |
| 108 | + {+default-profile+}. To learn more about creating a |
| 109 | + profile, see :ref:`mcli-configure`. |
| 110 | + - no |
| 111 | + |
| 112 | + * - ``--ssl`` |
| 113 | + - |
| 114 | + - Flag that indicates whether this sync store only accepts |
| 115 | + connections encrypted using |tls|. |
| 116 | + - no |
| 117 | + |
| 118 | + * - ``--uri`` |
| 119 | + - string |
| 120 | + - Comma-separated list of hosts in the ``<hostname:port>`` |
| 121 | + format to use to access this sync store. |
| 122 | + - yes |
| 123 | + |
| 124 | + * - ``--writeConcern`` |
| 125 | + - string |
| 126 | + - :manual:`Write concern </reference/write-concern/>` to use for |
| 127 | + this sync store. Valid values are: |
| 128 | + |
| 129 | + - ``ACKNOWLEDGED`` |
| 130 | + - ``W2`` |
| 131 | + - ``JOURNALED`` |
| 132 | + - ``MAJORITY`` |
| 133 | + |
| 134 | + - no |
| 135 | + |
| 136 | +.. _mcli-om-admin-backup-sync-create-output: |
| 137 | + |
| 138 | +Output |
| 139 | +------ |
| 140 | + |
| 141 | +.. include:: /includes/command-output-intro.rst |
| 142 | + |
| 143 | +.. code-block:: sh |
| 144 | + :copyable: false |
| 145 | + |
| 146 | + Sync store '<name>' created |
| 147 | + |
| 148 | +The default output contains a subset of the fields returned by this |
| 149 | +command. For the complete list of |json| fields returned by the |
| 150 | +command, see the :opsmgr:`API reference |
| 151 | +</reference/api/admin/backup/sync/mongoConfigs/create-one-sync-store-configuration/#response>`. |
| 152 | + |
| 153 | +.. _mcli-om-admin-backup-sync-create-egs: |
| 154 | + |
| 155 | +Example |
| 156 | +------- |
| 157 | + |
| 158 | +The following ``mongocli om admin backup sync create`` command |
| 159 | +creates the Sync store named ``test``. The command uses the |
| 160 | +{+default-profile+}, which contains the credentials for accessing |
| 161 | +|onprem|. |
| 162 | + |
| 163 | +.. tabs:: |
| 164 | + |
| 165 | + .. tab:: Default Output |
| 166 | + :tabid: default |
| 167 | + |
| 168 | + .. code-block:: shell |
| 169 | + |
| 170 | + mongocli om admin backup sync create --name test |
| 171 | + --uri mongodb://localhost:27017 |
| 172 | + |
| 173 | + The previous command returns the following: |
| 174 | + |
| 175 | + .. code-block:: shell |
| 176 | + :copyable: false |
| 177 | + |
| 178 | + Sync configuration 'test' created. |
| 179 | + |
| 180 | + .. tab:: JSON Output |
| 181 | + :tabid: json |
| 182 | + |
| 183 | + .. code-block:: shell |
| 184 | + |
| 185 | + mongocli om admin backup sync create --name |
| 186 | + test --uri mongodb://localhost:27017 --output json |
| 187 | + |
| 188 | + The previous command returns the following: |
| 189 | + |
| 190 | + .. code-block:: shell |
| 191 | + :copyable: false |
| 192 | + |
| 193 | + { |
| 194 | + "name": "test", |
| 195 | + "uri": "mongodb://localhost:27017", |
| 196 | + "ssl": false, |
| 197 | + "loadFactor": 1 |
| 198 | + } |
0 commit comments