Skip to main content

WEBfactory 2010

Backup and restore a WEBfactory 2010 project database

Abstract

Check ou this tutorial and learn how to backup and restore a WEBfactory 2010 Studio project database.

There are three methods of backing up and restoring databases in WEBfactory 2010 :

  1. Backup and restore from WEBfactory 2010Studio - only the main project database can be backed up. This method does not do Logs, Events and AlarmLogs databases backup.

  2. Backup and restore from Microsoft SQL Server Management Studio - can create backups for Logs, Events and AlarmLogs databases too. This method can be further simplified by using scripts to automate a predefined backup or restore.

  3. Using the backup and restore scripts - backup and restore scripts can be exported from the Microsoft SQL Server Management Studio. Along with the WFRunScripts.cmd file, the scripts can automate the backup and restore processes and can help less advanced users.

Backup and restore from WEBfactory 2010Studio
Backup

To backup a project database using WEBfactory 2010 Sudio:

  1. Open the desired project in WEBfactory 2010Studio.

  2. Go to the Project menu and select Backup project.

    Backup project option in WEBfactory 2010Studio

    Backuyp_project_option.jpg
  3. Select a name for the backup file and a place to store it.

    Backup_name_and_location.jpg
  4. Click OK and wait for the backup process to finish.

    WF_SE_529.jpg
Restore

To restore a backup using WEBfactory 2010Studio:

  1. Open the desired project in WEBfactory 2010Studio.

  2. Go to the Project menu and select Restore project.

    Rstore_project_from_WF.jpg
  3. Browse for the backup file, and name it in the Database name field. The path should be the default one.

    Conect_project_dialog.jpg
  4. Alternatively, a backup can be restored from the WEBfactory 2010Studio login screen:

  5. Select Connect and wait until the process is complete.

  6. Alternatively, a backup can be restored from the WEBfactory 2010Studio login screen:

  7. Select [New Database] from the Database option.

    New_db.jpg
  8. In the New Database window, name the database and make sure to select the Restore backup option. Browse for the backup file and click New.

    Restore_from_login_screen.jpg
  9. The new project will have the database from the backup file.

Backup and restore from Microsoft SQL Server Management Studio
Backup

To backup project database from Microsoft SQL Server Management Studio, login to Microsoft SQL Server Management Studio and browse the Databases folder structure to locate the desired database for backup.

Microsoft SQL Server Management Studio allows the user to back up the AlarmLog, Events and Logs databases, besides the main database of the project. Each database needs to be backed up individually.

  1. Right-click on the desired database and go to Tasks > Back Up....

    Database_backup.jpg

    Database backup from Microsoft SQL Server Management

  2. In the Back Up Database window, select a Destination for the backup.

    WF_SE_536.jpg
  3. Select the Options page from the Select a page panel (upper-right side). It is recommended to have Overwrite all existing backup sets and Verify backup when finished selected.

    WF_SE_537.jpg

    Note

    Optionally, before clicking the OK button, this settings can be exported to a script for easier use later on. To export the backup settings, select the Script option from the top of the window.

    Export_config_2.jpg

    Exporting the configuration

    Select the location and the name of the .sql script file.

    If dragged and dropped over a command file, this script will automatically backup the database as set in the options above. This is useful when dealing with users with no SQL Server Management Studio knowledge.

  4. Click OK to start the backup process.

The same process is required for backing up additional databases like Logs, AlarmLogs and Events databases.

Restore

To restore a backup using Microsoft SQL Server Management Studio:

  1. Right-click on the Databases entry from the Object Explorer panel. Select Restore Database....

    Restoring_a_backup_database.jpg

    Restoring a backup database

  2. In the Restore Database window, enter a name for the new database. Select the option to select the source From device.

    Restore_database_options.jpg

    Restore database options

  3. Click on the button corresponding to the From device option. The Specify Backup window will open. Use the Add button to select your backup from the disk.

    Secting_the_backup_file.jpg

    Selecting the backup file

  4. Click OK to return to the Restore Database window. Notice that the selected backup file is listed in the Select the backup sets to restore area.

  5. Make sure the Restore button is checked

    Restore_button_is_checked.jpg

    Restore button is checked

    Note

    Before clicking the OK button, this settings can be exported to a script for easier use later on. To export the restore settings, select the Script option from the top of the window.

    export_the_config.jpg

    Exporting the configuration

    Select the location and the name of the .sql script file.

    If dragged and dropped over a command file, this script will automatically restore the database as set in the options above. This is useful when dealing with users with no SQL Server Management Studio knowledge.

  6. Check the Restore option and select OK to restore the backup database.

Using the backup and restore scripts

Download the WFRunScript.cmd file here.

The WFRunScript.cmd file needs to be edited before using. Open the file with any text editor and replace the path and the name with the path and name of your database.

Edit_cmd_file.jpg

Edit the .cmd file to fit your project

To use the previously created backup and/or restore scripts, select the script and drop it on the WFRunScript.cmd command file.

execute_files.jpg

Drag and drop the scripts on the .cmd file to execute them