Share via


Copy-NAVTenantData

DO NOT USE: This cmdlet is for internal use only. It can't be used for Business Central on-premises tenants. For information about managing on-premises tenants, see https://go.microsoft.com/fwlink/?linkid=2153727.

Syntax

Default (Default)

Copy-NAVTenantData
    [-ServerInstance] <String>
    [-SourceTenant] <TenantId>
    [-DestinationTenant] <TenantId>
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Use the Copy-NAVTenantData cmdlet to copy data from a tenant to another tenant in the same tenant database.

The destination tenant must not contain any business data, and must be similar to a tenant that is created by using the New-NAVTenant cmdlet. The source and destination tenants must be mounted on the same Business Central Server instance.

Together with the New-NAVTenant cmdlet, this cmdlet provides you with an efficient way to create multiple tenants that are pre-populated with business data. For example, you can have one tenant that contains the business data, and acts as a kind of template tenant for other tenants. You can create new tenants with the New-NAVTenant cmdlet, and then populate the new tenants with data by using the Copy-NAVTenantData cmdlet.

The concept of creating new tenants and copying data between tenants is particularly useful when setting up buffer tenants in a deployment environment where you have to get new tenants up and running quickly on demand. Buffer tenants are created using the Set-NAVTenant cmdlet. For more information about buffer tenants, see the help for the Set-NAVTenant cmdlet.

Examples

EXAMPLE 1

Copy-NAVTenantData -ServerInstance NavServer -SourceTenant TenantA -DestinationTenant TenantB

This example copies data from 'TenantA' to 'TenantB' which are in the same tenant database on the server instance 'NAVServer'. Both tenants are mounted on the server instance 'NavServer'.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DestinationTenant

Specifies the ID of the tenant that you want to copy data to. This tenant must be mounted on the server instance.

Parameter properties

Type:TenantId
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DestinationId

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServerInstance

Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-SourceTenant

Specifies the ID of the tenant that you want to copy data from. This tenant must be mounted on the server instance.

Parameter properties

Type:TenantId
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SourceId

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

By value and by property name: ServerInstance

Microsoft.Dynamics.Nav.Types.TenantId

By property name: SourceTenant

Microsoft.Dynamics.Nav.Types.TenantId

By property name: DestinationTenant