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
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.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationTenant
Specifies the ID of the tenant that you want to copy data to. This tenant must be mounted on the server instance.
Type: | TenantId |
Aliases: | DestinationId |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SourceTenant
Specifies the ID of the tenant that you want to copy data from. This tenant must be mounted on the server instance.
Type: | TenantId |
Aliases: | SourceId |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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