Search Results for

    Show / Hide Table of Contents

    Database Package

    In this step we will create a package with a database backup. The package contains a backup of a database to use and restore in the installation of a new POS.

    You must prepare this database backup with the necessary data for your POs'es, and then use the tools described in this section to create the package. A common practice is to maintain a POS master database, with all the data necessary (items, offers, etc...) and create the backup from it and distribute it's backup to the POS'es.

    Example:

    $ErrorActionPreference = 'stop'
    
    Import-Module LsPackageTools\DatabasePackageCreator
    Import-Module UpdateServiceServer
    
    $Arguments = @{
        Id = "my-database"
        Name = 'My Database'
        Version = '1.0.0'
        OutputDir = 'c:\MyGoCPackages\Output'
        Path = 'c:\path\to\database.bak'
        BcPlatformVersion = '16.0.11233.12061' # This must match the Business Central (platform) database version
    }
    
    New-DatabasePackage @Arguments | Import-UssPackage
    

    The specific parameters for this cmdlet are:

    • Id, Name, Version and OutputDir are common package parameters.
    • Path: Specify the path to your database backup.
    • BcPlatformVersion: Specify the Business Central platform version that matches your database backup. I.e. if a Business Central service tier with version 16.0.11233.12061 is connected to your database at the time of backup, specify that version.

    Common Questions

    Is the database replaced during the update?

    No, the database package is only restored during installation, not update. To update the database's data, use Data Director.

    The database is not removed, when uninstalled.

    By design, the database is never deleted or overwritten to ensure you won't lose your data by accident. If you remove an LS Central instance with Update Service, you must manually remove the database.

    Next Steps

    • Create .Net Add-in Package
    • POS Bundle
    In This Article
    Back to top Generated by DocFX