To restore a SQL Server backup file of your Bizagi database follow the steps described below.
For doubts on this approach, and details on what information is stored at the backup file, refer to How to restore a backup of your Bizagi database.
For the following steps, you will need the SQL Server client and configuration tools, mainly the SQL Server Management Studio.
This tool can be included when installing the SQL Server database.
In case that your SQL Server version does not include the SQL Server Management Studio, you may download and install it directly from Microsoft's official web site at no cost.
Before you start
Before restoring a backup, first make sure you consider the following aspects:
1. Matching collations.
Make sure that your target SQL Server instance has a configured SQL Server collation that matches the one configured at the source SQL Server instance (from where the backup was created).
To review the collation of your SQL Server instance, you may right-click the instance and select its properties:
2. No active connections.
For a restore, SQL Server requires that there are no active connections at the moment.
It is also recommend that you coordinate this task with any other team member so that everyone working in that project does not have that project opened, and so that they know you are restoring the database into a previous state.
If you are running your project in a .NET platform, take into account that the Scheduler service will be most likely in a started mode (hence having an active connection to the database).
To stop the Scheduler to make sure that its connection is not active, use the Windows services panel.
Restoring a database backup
To restore a database .bak backup, follow these steps.
1. Login to your SQL Server instance through SQL Server Management Studio.
Make sure you use a login account that has rights to restore a backup.
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.
Make sure you select the appropriate existing target database files (.dat and .log).
Notice that in a Bizagi project, these database files are located by default:
•At C:\Bizagi\Projects\[Bizagi_project]\Database\, in a scenario where you are using a local database instance (the database server is the same server where Bizagi is installed).
•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 where Bizagi is installed).
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.