New-VEMDBCollectionRestoreOptions
Short Description
Defines the restore options that you can apply to a restore job.
Applies to
Veeam Backup & Replication
Product Edition: Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides parameter sets that allow you to:
- Specify restore options for a collection stored in the backup repository.
New-VEMDBCollectionRestoreOptions [-Collection] <VEMDBCollection> [-NewCollectionName <String>] [-NewDatabaseName <String>][<CommonParameters>] |
- Specify restore options for a collection that published collection.
New-VEMDBCollectionRestoreOptions [-NewCollectionName <String>] [-NewDatabaseName <String>] [-PublishedCollection] <VEMDBPublishedCollection> [<CommonParameters>] |
Detailed Description
This cmdlet creates restore options that you can use in a restore job of MongoDB collections. You can use it to specify the collection you want to restore, the new name for the restored collection, and the name of the database to which the collection will be restored.
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|---|---|---|---|---|
Collection | Specifies a backed-up MongoDB collection to which the settings will apply. | Accepts the VEMDBCollection object. To get this object, run the Get-VEMDBCollection cmdlet. | True | 1 | True (ByValue) |
PublishedCollection | Specifies a published MongoDB collection to which the settings will apply. | Accepts the VEMDBPublishedCollection object. To get this object, run the Get-VEMDBPublishedCollection cmdlet. | True | 1 | True (ByValue) |
NewDatabaseName | Specifies the name of the database to which the collection will be restored. | String | False | Named | False |
NewCollectionName | Specifies the new name of the restored collection. | String | False | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Output Object
The cmdlet returns the VEMDBCollectionRestoreOptions object that contains the restore options for the specified collection.
Examples
Example 1. Specifying Default Restore Options
This example specifies restore options for the home office collection. The collection will be restored with its original name, to the original database.
Perform the following steps:
The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
|
Example 2. Specifying New Name for Restored Collection
This example specifies restore settings for the first collection in the employees database. The collection will be restored with a new name, to the original database.
Perform the following steps:
The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
|
Example 3. Specifying New Name for Target Database
This example specifies restore settings for the first collection in the customers database. The collection will be restored with the original name, to a new database.
Perform the following steps:
The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore job. In our example, it is the first restore job in the array.
|
Example 4. Specifying Restore Options for Published Collection
This example specifies restore settings for the first collection on the published MongoDB instance. The published collection will be restored with a new name, to a new database.
Perform the following steps:
The cmdlet will return an array of collections on the published instance. Note the ordinal number of the necessary published collection. In our example, it is the first collection in the array.
|
Related Commands