Which is a preferred method for routine backup of NAV companies? In addition, can you set an automatic backup of the companies within the NAV client? I know we can script or use a utility for the SQL database.
We would prefer to backup nightly.
Thank you.
*This post is locked for comments
Backup is an important component of a sound disaster recovery strategy. Presence of a valid and restorable backup is the last thing you should worry about when the moment comes to execute a real disaster recovery scenario during an emergency downtime. Here are some best practices you can follow to ensure you have a good backup in place:
1) Make sure you are not storing your backups in the same physical location as the database files. When your physical drive goes bad, you should be able to use the other drive or remote location that stored the backups in order to perform a restore.
2) Make sure you have a proper backup schedule established according to the needs of the application and business requirements. As the backups get old, the risk of data loss is higher unless you have a way to regenerate all the data till the point of failure.
3) Make sure to actually restore the backups on a test server and verify that you can restore with all the options and conditions you need to use during a planned or un-planned downtime.
4) Use the verification options provided by the backup utilities [BACKUP TSQL command, SQL Server Maintenance Plans, your backup software or solution, etc].
hi,
use SQL Maintenance Plans (for Backup, Tables optimizations etc., best solution i think) or use SQL scheduled jobs instead of maintenance plans.
...but... if you want to use NAV Client to achieve this gol... you can run powersehll from NAV (a nice Waldo production!") www.waldo.be/.../running-powershell-from-nav
For me SQL Agent is the most easiest way to take backup, however as suresh mentioned you can use Powershell to do regular backups of the database.
Hey addidion1,
I belief SQL Job queue will be the best approach for doing so. From SQL Server Agent you can go and assign it and can give a designated timing to take the backup. it will keep taking the backup everyday and let it get saved to a desired location.
Here i have published two blog posts specially for you with both option you can have a look:
SQL Server Database Backup using PowerShell : msdynamicsnavashwinitripathi.wordpress.com/.../sql-server-database-backup-using-powershell
Schedule SQL Job for SQL Database Backup :
msdynamicsnavashwinitripathi.wordpress.com/.../schedule-sql-job-for-sql-database-backup
Mark the solution as Suggested answer if you find this helpful and resolves your query.
To me the best option is to schedule SQL Maintenance Plan and setup the period for the backup: msdn.microsoft.com/.../ms187658.aspx
Now it is very easy in SQL Management Studio with Maintenance Plan Wizard (you basically do not need to write any SQL queries for that!):
msdn.microsoft.com/.../ms191002.aspx
(compare to this: msdn.microsoft.com/.../ms189953.aspx)
You can use this scrip if you prefer to use PowerShell:
Backup-NAVSqlDatabase `
-DatabaseServer $NAV_DatabaseServer `
-DatabaseInstance $NAV_DatabaseInstance `
-DatabaseName $NAV_DatabaseName `
-DatabaseBackupFilePath $NAV_DatabaseBakFile
replace all variables with suitable actual values.
another way is you can schedule a job to take backup of the database in SQL Server.
Under Management -> SQL Server Agent -> Jobs and configure the backup script / parameters.
You can use Powershell or Create SQL Maintenance Plan to do regular backups of the database
www.waldo.be/.../nav-2013-r2-backup-and-restore
YOu cannot automate backup using NAV Client you need to use Powershell or SQL.
Sohail Ahmed
2
mmv
2
Amol Salvi
2