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

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searching for the error i figured out the issue was due to - Design change in NA

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.