Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Backing up database in powershell

(0) ShareShare
ReportReport
Posted on by

I am trying to backup database in powershell. I am currently trying to update my version of Business Central (19.0) to the newest (20.0). I am following the documentation and when I try to back up database I keep getting this error:

PS C:\Users\Administrator> Backup-SqlDatabase -ServerInstance BC190 -Database "Demo Database BC (19-0)" -BackupFile "C:\DBbackup\LVNLite.bak"
Backup-SqlDatabase : Failed to connect to server BC190.
At line:1 char:1
  Backup-SqlDatabase -ServerInstance BC190 -Database "Demo Database BC  ...
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      CategoryInfo          : NotSpecified: (:) [Backup-SqlDatabase], ConnectionFailureException
      FullyQualifiedErrorId : Microsoft.SqlServer.Management.Common.ConnectionFailureException,Microsoft.SqlServer.Management.PowerShell
   .BackupSqlDatabaseCommand

I have seen that some people have had trouble with the server instance. I am not sure what I am doing wrong here. Can anyone help?

  • Suggested answer
    YUN ZHU Profile Picture
    85,764 Super User 2025 Season 1 on at
    RE: Backing up database in powershell

    Hi, the instance here is not BC instance, this is SQL Server Instance.

    https://docs.microsoft.com/en-us/powershell/module/sqlserver/backup-sqldatabase?view=sqlserver-ps

    pastedimage1649297682467v1.png

    For example:

    pastedimage1649297770781v2.png

    Hope this will help.

    Thanks.

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans