Skip to main content

NAV 2013 R2 - How to Backup Selected companies - Powershell (Using Service Tier).

Hi all,

In this post we will list down the steps to take backup using power shell & Service Instance.

If you haven't read the Previous post, please refer to Index of Posts.

We will see usage of below listed 3 & 4 Commandlet options in this post.

3. UseNST_AllCompanies
4. UseNST_SomeCompanies

Let's see how to use each of them.



3. UseNST_AllCompanies

* Remember the Service Instance Should be Running and Available.

Below are parameters of the command-lets 3 -

1.  All Companies - You want to backup all companies or not.
2.  File Name - The File Path and name where you want to store the backup (ends with Extension => .navdata).
3.  ServerInstance - Service Name which is connected to Database which we want to backup.
4.  Description - Description to file that you want to give.
5.  Include Application - Want application objects or not.
6.  Include Application Data - Want  data that defines the application in the database.
7.  Include Global Data - Want Data common to all companies or not.
8.  Tenant - Used in Multitenat (Will Discuss Later in Separate Post)

As shown below is the parameters set for the backup.



Below is the command generated for the all companies backup.
-------------------------------------------------------------------------
Export-NAVData -AllCompanies -FileName c:\All_Comapniesbackup_Service.navdata -ServerInstance DynamicsNAV71 -Description "This is all companies backup using service tier." -IncludeApplication -IncludeApplicationData -IncludeGlobalData
-------------------------------------------------------------------------
Run the command and backup will be placed as shown below.



4. UseNST_SomeCompanies

* Remember the Service Instance Should be Running and Available.
* In this script we skip the application objects and global data.

Below are parameters of the command-lets 4 -

1.  File Name - The File Path and name where you want to store the backup (ends with Extension => .navdata).
2.  ServerInstance - Service Name which is connected to Database which we want to backup.
3.  CompanyName - Name of Company you want to backup (if multiple put them as comma separated).
    * Multi Character Name should be in ''. 
4.  Description - Description to file that you want to give.
5.  Include Application - Want application objects or not.
6.  Include Application Data - Want  data that defines the application in the database.
7.  Include Global Data - Want Data common to all companies or not.
8.  Tenant - Used in Multitenat (Will Discuss Later in Separate Post)

As shown below is the parameters set for the backup.



Below is the command generated for the all companies backup.
-------------------------------------------------------------------------
Export-NAVData -FileName c:\Two_Comapniesbackup_Service.navdata -ServerInstance DynamicsNAV71 -CompanyName B,'CRONUS International Ltd.' -Description "This is two companies backup using service tier without Global data." -IncludeApplicationData
-------------------------------------------------------------------------
Run the command and backup will be placed as shown below.



I hope you are able to understand the concept discussed above. In Next post we will see how to Take Backup from Windows Client.

Regards,
Saurav Dhyani

Comments

Popular posts from this blog

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.