Start-VEMDBRestoreJob

Short Description

Restores MongoDB collections or the entire MongoDB instance.

Applies to

Veeam Backup & Replication

Product Edition: Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides parameter sets that allow you to:

  • Restore collections to a target MongoDB deployment.

Start-VEMDBRestoreJob [-InstancePort <Int32>] [-InstanceCredentials] <PSCredential> [-Server <String>] [-SshPort <Int32>] -Credential <VEMDBLinuxCredentials> [-UseTLS] [-Collections] <VEMDBCollectionRestoreOptions[]> [-RestoreAdminDatabase] [-Force] [<CommonParameters>]

  • Restore an entire MongoDB instance to a target Linux machine with MongoDB.

Start-VEMDBRestoreJob [-InstancePort <Int32>] [-Server <String>] [-SshPort <Int32>] -Credential <VEMDBLinuxCredentials> [-Session] <VEMDBRestoreSession> [[-DataFolderPath] <String>] [-Force] [<CommonParameters>]

Detailed Description

This cmdlet restores backed-up MongoDB collections or the entire backed-up MongoDB instance. After you start a restore job, you can stop the restore process with the Stop-VEMDBRestoreJob cmdlet.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Collections

For collections restore.

Specifies the collections and their restore options.

Accepts the VEMDBCollectionRestoreOptions[] object. To get this object, run the New-VEMDBCollectionRestoreOptions cmdlet.

True

0

False

Session

For instance restore.

Specifies a restore session initiated to perform operations with MongoDB.

Accepts the VEMDBRestoreSession object. To get this object, run the Get-VEMDBRestoreSession cmdlet.

True

0

False

InstanceCredentials

For collections restore.

Specifies the credentials for the target MongoDB instance.

Note: The user must have the root MongoDB role on the target replica set.

Accepts the PSCredential object. To get this object, run the Get-Credential cmdlet.

True

1

False

DataFolderPath

For instance restore.

Specifies the path to which the cmdlet will restore the MongoDB instance.

Note: If you do not specify this parameter, the instance will be restored to the original location.

String

False

1

False

Credential

Specifies credentials for authenticating to the primary node of the MongoDB deployment or the target MongoDB server.

Note: The user must have root privileges on the target server.

Accepts the VEMDBLinuxCredentials object. To get this object, run the New-VEMDBLinuxCredentials cmdlet.

True

Named

False

Force

Defines that the cmdlet will overwrite existing MongoDB data with data from the backup.

Note: The cmdlet will show no prompt before executing the command.

SwitchParameter

False

Named

False

InstancePort

Specifies the port of the target MongoDB instance.

Default: 27017

Int

False

Named

False

RestoreAdminDatabase

For collections restore.

Defines that the cmdlet will restore the admin database.

SwitchParameter

False

Named

False

Server

Specifies DNS name or IP address of the primary node of the target MongoDB deployment or the target MongoDB server.

String

False

Named

False

SshPort

Specifies the SSH port number that the cmdlet will use to connect to the Linux machine.

Default: 22

Int

False

Named

False

UseTLS

For collections restore.

Defines that the cmdlet will connect to the target MongoDB deployment using a secure TLS protocol.

SwitchParameter

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 VEMDBRestore object, that contains information about the status of the MongoDB restore job.

Examples

Start-VEMDBRestoreJobExample 1. [For Collections Restore] Restoring Specific Collection With Default Settings

Start-VEMDBRestoreJobExample 2. [For Collections Restore] Restoring All Collections in a Replica Set With Default Settings

Start-VEMDBRestoreJobExample 3. [For Collections Restore] Restoring Collections With Custom Restore Options

Start-VEMDBRestoreJobExample 4. [For Instance Restore] Restoring Entire MongoDB Instance

Related Commands

Page updated 3/25/2025

Page content applies to build 12.3.1.1139