SQL Server Backup and Restore

<< Click to Display Table of Contents >>

Navigation:  Bizagi Engine > Bizagi system administration > Maintenance and administration > Backing up Bizagi > Database backups >

SQL Server Backup and Restore


As part of common maintenance and administration tasks, it is of critical importance to always be able to rely on backups for the possibility to restore your project to a previous state, should an unexpected event occur.

Restoring your project to a previous state when having a database backup is a really simple procedure for a Bizagi System, given that Bizagi is data-driven.

For more information, refer to Maintenance and administration.


Important notes

Backups in such types of tasks are mainly created as a contingency measure.



Restoring a database backup should only be considered as a contingency measure to restore a given environment to a previous state, or to move an environment's database to a new location.

This means that a development environment backup should only be restored in the same development environment, and a production environment backup should only be restored in the same production environment.

To create environments, Bizagi offers its Deployment options.



When using a SQL Server database instance as the database engine for a Bizagi project database, the backup-and-restore operation is done through SQL Server Management Studio.

If you are using an Oracle instance as Bizagi's database instead, refer to Oracle's Export and Import.



Keep in mind that case attachments are not stored within the backup itself.




To backup and restore a SQL Server database for a Bizagi project, it is required:


1. To have Microsoft SQL Server Management Studio installed for the client connection to the corresponding SQL Server version of the database.

For further information about SQL Server Management Studio, refer to Microsoft sites such as: http://www.microsoft.com/en-us/download/details.aspx?id=22985.


2. To have in your SQL Server involved instances (both the source and target databases Servers), a matching SQL Server version and configuration collation (the same one).





Creating a database Backup

To create a database backup:


1. Login to your SQL Server instance through SQL Server Management Studio.




2. Right-click on the specific database of your Bizagi project and select the Backup... option:




3. Specify that the backup type is set to FULL mode.




Notice that you need to select a valid path to store the resulting backup (.bak) file.

If you do not want to choose the default path, you may browse and select another file directory. If you choose a different location, ensure you have write access.




4.  Click on OK when the backup has executed completely.





You may also choose to take different types of backups as described:

Full Backup: This is a complete backup of the entire database. Once made, committed transactions in the transaction log are cleared, by mean of a process called log truncation; this is what keeps transaction logs from growing forever.

Differential Backup: This is backup of the database, but only the data that changed since the last full backup is included. The transaction log is also truncated.


In order to restore a Bizagi project to its latest backup state, it is recommended to create backups through as a Full backup mode.

For instance, automatic backups created by Bizagi are set this way.




If you wish to schedule your backups as an automated task, you may review useful external links such as http://support.microsoft.com/kb/930615.


Restoring a database


Before you start

Before restoring a backup into a database in use, ensure that there are no active connections at the moment.


If you are running your processes in a .NET platform, take into account that the Scheduler service will be most likely in a started mode, using an active connection to the database.

Therefore to stop the Scheduler so that this connection is released, open Bizagi Management Console and stop the project's scheduler through the Scheduler options:





Performing the restore operation

Once you have ensured that the database is not in use, you may restore a backup:


1. Login to your SQL Server instance through SQL Server Management Studio.




2. Right-click on the specific database of your Bizagi project and select the Restore -> Database... option:




3.  Select that the database will be restored from a device. Browse and add your .bak backup file as the source media:









Keep in mind that SQL Server keeps backward compatibility. This means that restoring a 2005 or 2008 backup can be done into a 2012 instance, but not vice versa (a newer version's backup cannot be restored into an older version).


4. Check the Restore option for this media.




5. Go to the Options tab, and mark the Overwrite the existing database option.




Ensure you select the appropriate existing target database files (.dat and .log).




Notice that in a Bizagi project, these database files are by default located:

At C:\Bizagi\Projects\[Bizagi_project]\Database\, in a scenario where the database server is the same local server used for the Bizagi Server.

At SQL Server's default path (C:\Program Files (x86)\Microsoft SQL Server\[instance_installation]\MSSQL\Data\) if the database server is a remote server (and not the same Bizagi Server).



6. Click on OK when the restore operation has executed completely.






After restoring a database backup in a Bizagi project, it is really important that you restart your project services.

If your project is running in a .NET platform, this is done through the IISReset command, and by restarting the Scheduler service.