Creating a backup using a Dynamics NAV client is one of the easiest methods of backing up and restoring the database.
Retrieving a backup of the Dynamics NAV database
We can use the following steps to retrieve a backup of the Dynamics NAV database (SQL Server database or Classic database):
1. After connecting to the appropriate Dynamics NAV database go to the Tools menu and click on Backup.
2. Select one of the following Backup options:
Entire Database: This backup is used to back up all the three main components of the Dynamics NAV database backup, as follows:
Selected companies: Select from the list of companies in the database that need to be backed up. Full backup selects all companies by default.
Data common to all companies:
This option includes backing up the data that is common to all
companies and includes the data such as login information, permissions,
roles, printer selections for the Dynamics NAV client, and so on.
Application Objects: Selecting this option will also include all Dynamics NAV objects in the backup file.
All Companies: All the companies in the database are selected by default when we use this option.
Custom: Any of the three options—Selected companies, Data Common to All Companies, or Application Objects—can be selected.
If the backup is too large to
be stored over one file, the system will create multiple files
incrementing the filename with the number. The backup process file is
compressed and a database test is run on the database before the backup
is complete.
Restoring the database
To restore the database,
a blank database has to be created first, either in the SQL Server or
Classic database server. Then follow the next steps to restore the
database:
1. While logged in to the database, click Tools | Restore.
2. Select the backup file (.fbk>).
3. A window similar to the Backup window appears, where we have to select from the available options of Selected Companies, Data Common to All Companies, and Application Objects.
Handling error messages
An error message generated during the restore process could possibly be due to one of the following reasons:
If the database size of
the blank database is not enough to restore the backup into the
database. This will not occur in the Dynamics NAV client for SQL Server,
if the data and log files are set to unlimited growth.
If
we have a linked object in the backup, the SQL components required by
the linked objects need to exist in the SQL database prior to the
restore process. This is only applicable while backing up using the
Dynamics NAV SQL Server option.
If
the datatype of a field in the blank database differs from what is in
the backup file. This also affects some properties of the field; if a
property of the field such as the length of the field is different and
smaller (40 characters) in the database and the backup is trying to
restore the field value of 50 characters.
If there is another company in the database, which has the same name as the company that is being restored from the backup file.
If there are checksum issues/corrupt backup files.
An
error may be generated during the synchronization process if the
Windows login table ID(s) and Windows logins do not match.
Synchronization automatically starts after the restore process. If this
error occurs, the restore will not roll back, and the synchronization
will have to be manually done after fixing the login issue. This is
applicable only while backing up using the Dynamics NAV SQL Server
option.
If there is a character in the restore data that is not in the current SQL collation.
If a lowercase character is found in a CODE field (if entered directly in SQL).
If a date issue is caused by differing regional settings.