<< Click to Display Table of Contents >> SQL Server Backup and Restore |
Overview
As part of common maintenance and administration tasks, it is of critical importance to always be able to rely on backup so you can 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 simple procedure for a Bizagi System, given that Bizagi is data-driven.
For more information, refer to System 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, perform the backup-and-restore operations 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. |
Prerequisites
To backup and restore a SQL Server database for a Bizagi project, it is required:
1. 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. Have in your relevant SQL Server instances (both the source and target databases servers), a matching SQL Server version and configuration collation.
Creating a database Backup
To create a database backup:
1. Login to your SQL Server instance through the SQL Server Management Studio.
2. Right-click the specific database of your Bizagi project and select the Backup... option:
3. Set the backup type to FULL mode.
You need to select or provide 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, make sure you have write access.
4. Click OK when the backup has executed completely.
Important
You can choose to make different types of backups:
•Full Backup: This is a complete backup of the entire database. Once it is 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.
To restore a Bizagi project to its latest backup state, we recommend that you create backups using a Full backup mode.
For instance, automatic backups created by Bizagi are set this way.
To schedule your backups as an automated task, 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, make sure that there are no active connections to the database.
If you are running your processes in a .NET platform, the Scheduler service will be most likely in a started mode, using an active connection to the database.
To stop the Scheduler so that this connection is released, open the Bizagi Management Console and use the Scheduler options:
Performing the restore operation
Once you have ensured that the database is not in use, you may restore it using a backup:
1. Login to your SQL Server instance through the SQL Server Management Studio.
2. Right-click 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 to and add your .bak backup file as the source media:
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. Select the Restore option for this media.
5. Go to the Options tab, and select the Overwrite the existing database option.
Make sure you select the appropriate existing target database files (.dat and .log).
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 OK when the restore operation has executed completely.
Important
After restoring a database backup in a Bizagi project, restart your project services.
•If your project is running on a .NET platform, do this through the IISReset command, and by restarting the Scheduler service.