Back up and restore Bp Premier

This article explains how to back up and restore the Bp Premier database.

Back up the entire database

Schedule a backup

Restore the entire database

Restoring production data to a test server

Back up and restore from the command line

Frequently asked questions

When and how should I back up the database?

Best Practice Software recommend that you back up your Best Practice data daily using the supplied utility BP Backup, even if you use a third-party backup utility. BP Backup provides the simplest restore of the database.

Best Practice also recommend that a test restore of the backup is performed to a separate server on a regular basis to ensure that your backups are valid and can be restored. Store backups off-site in a secure location.

You can manually back up the database at any time, but it is better practice to set up a scheduled backup to run overnight or during a time of minimal server activity.

NOTE  Users performing backup and restore operations will require some or all of the Configuration, Perform a backup, and Perform a restore permissions set to 'Allow access'.

What if I use a third-party backup tool?

Your practice's IT and disaster recovery guidelines may require you to use another software tool for database backup and archive. The BP Backup utility will not interfere with any third-party archiving software. However, Best Practice Software Support are unable to provide comprehensive support to sites trying to recover a backup performed by a third-party product, only with backups from the BP Backup utility.

When using a third-party backup software that has an SQL agent, the user details required to access the database are:

User: BPSBackup

Password: Set in the Database tab of the Configuration screen

IMPORTANT  Do not lose the password that you set for this account, because it cannot be reset by a Bp Premier user. Store the password in a secure location such as the practice safe.

Back up the entire database

  1. Log into Windows on the Bp Premier server as a Windows Administrator user. If you are not an administrator user with sufficient privileges, Windows may ask you to elevate and supply an administrator password when you run the backup utility.
  2. On Windows 8 or later, select the Windows logo in the bottom left > AppsBP Backup.
  3. The BPS Backup Utility screen will appear. Click Backup database. Enter the username and password of a Bp Premier user with the permission Perform a backup set to 'Allowed'. A file explorer will open.
  4. Browse to the folder you want the Best Practice Software backup file to be stored.
  5. From the Save as type drop-down, select the type of compression. This step is optional.
  6. A compressed backup creates one zip file containing a file for each Best Practice database and requires free space on the Bp Premier hard disk at least three times the size of the database, to allows creation of temporary files.

    An uncompressed backup creates one file for each Best Practice database.

  7. Click Save. The filename will default to a timestamp format, for example, 'BP_20080513105335'.

After the backup has completed, BP Backup will notify the success or failure of the backup. Best Practice Software recommend that you copy or move the backup files to an external device that can be stored in an off-site location.

Schedule a backup

Scheduled backups allow you to back up Bp Premier data while the system is unattended, and schedule a backup several times a week or on the same day (a lunchtime and evening backup, for example). Backups are scheduled through the Bp Premier Windows service BpService.

  1. Select Setup > ConfigurationBp Service tab.
  2. Click Configure Automated backup. The Scheduled backup screen will appear.
  3. Scheduled Backup

  4. Tick Perform scheduled backup.
  5. Set a Default backup folder to store backup files in. You can override this setting when you create a schedule.
  6. Click Add to add a new schedule. The Backup details screen will appear.
  7. Backup Details

  8. Select the Days of week to run the backup.
  9. Select the Backup time to run the backup.
  10. Select the Backup folder to store the backup files. Ensure the hard disk has enough space for the backup process and files. If you are running an uncompressed backup and the backup folder is on a network, you must use a mapped drive. UNC paths are not supported.
  11. Select Compressed to run a compressed backup. Compressed backups require free space on the Bp Premier hard disk at least three times the size of the database.
  12. NOTE  Ensure that the destination directory for backups has permissions set to allow read/write/delete. Set the permissions level to 'full control' for the 'network service' username. Your IT support can assist.

  13. Click Save to return to the Scheduled backup screen.
  14. If you do not wish to keep old backup files, tick the checkbox Delete old backups in the same folder.
  15. Tick Send message if backup fails and select one or more Bp Premier users if you want staff notified if a backup fails.
  16. Click Save to exit.

Restore the entire database

IMPORTANT  If you are restoring a Production database to a Test Bp Premier server, for example, to test a backup file is still valid, or to test a Program Update, follow the steps in Restoring production data to a test server. This restore scenario includes additional steps.

    When restoring, always log in to the Bp Premier server on the local machine or through a console connection. If you attempt to restore the database through a Remote Desktop session, Bp Premier will return an SQL error and will not restore.

  1. Log all users out of Bp Premier and shut down the Bp Premier server. Restoration will replace all existing data.
  2. Log in to Windows on the Bp Premier server as a Windows Administrator user.
  3. From the Windows desktop, click the Windows icon Windows logo in the bottom left and look for AppsBP Backup.
  4. The BPS Backup Utility window will appear.
  5. Click Restore database. Bp Premier will prompt that restoration will replace all current data. In Saffron SP2, ensure Production Database Restore is ticked in the prompt (it will be ticked by default), and Click Yes.
  6. Log in to the restore utility with a Bp Premier username and password.
  7. Browse to the folder where the backup file is stored that you wish to restore.
  8. If you are restoring an uncompressed backup, select ‘Uncompressed file’ from the Files of type: dropdown. If you are restoring a compressed backup, select ‘Compressed file’ from the Files of type: dropdown.

  9. Select the file to restore: .bku for an uncompressed backup, or .zip for a compressed backup file.
  10. Click Open. The restore process will begin.
  11. Click Close to close the backup utility after a successful restoration.

Restoring production data to a test server

Sometimes you will restore a backup of a Production environment database to a Test Bp Premier server, for example, to:

  • Test a Program Update upgrade before upgrading your Production server
  • Test a database converted from other practice management software
  • Test that a backup file is still valid.

Restoring production data to a test server in Saffron SP2

If you have upgraded to Saffron SP2, you will no longer be required to disable Bp Premier processes and run the Stop Polling Bp database script when restoring production data to a test server.

When restoring production data to a test server in Saffron SP2, follow the instructions in Restore the entire database. Once you reach step 5, ensure that Production Database Restore is unticked in the prompt, and click Yes.

IMPORTANT  You must untick Production Database Restore when restoring to a test server. Unticking Production Database Restore ensures production functionality is disabled on restore.

Continue with the remaining steps under Restore the entire database.

Restoring production data to a test server in Saffron SP1 or earlier

After you restore a production database backup, the test server will be loaded with your live configuration data and will begin operating as a production server, such as pulling in SMS schedules and results from a network share. You must disable all Bp-related services before the restore, and run a Bp database script after the restore to prevent this.

1. Disable Bp Premier processes

Bp Premier services can be disabled through the Windows Services app. You may need Windows Administrator permissions on the Bp Premier server to access the Services app.

  1. From the Windows Desktop search bar, search for 'Services'.
  2. Click the Services Desktop App.
  3. Scroll down the list of services until you see services prefixed with 'Best Health' and 'Best Practice'.
  4. Bp Services must have a blank status column

  5. Right-click on the first service highlighted in the example and select Stop. The Status of the service will change from 'Running' to blank. .
  6. Right-click on the same service and select Properties.
  7. Select a Startup Type of 'Disabled' and click Ok to save changes.
  8. Repeat for all services highlighted in the example. All of these services should have 'Disabled' in the Startup Type column.
  9. Further down in the Services list, Bp Premier includes some identifiable SQL Server services, as shown. These services, especially SQL Server (BPSINSTANCE) and SQL Server Browser, must be running.

    Bp SQL Services must still be running

2. Run the production database restore

Restore the production database image or backup to the test server, following the instructions in Restore the entire database.

3. Run the Stop Polling Bp database script

Download and run the 'stop polling' database script immediately after the datase restore has finished.

  1. Right-click here and select Save as or Save Link As to download the script file DisablePollingAfterRestore.bpscript to a known location. Some browsers may alert that the file is a security risk. You can safely download and keep this file.
  2. Copy the file to the test Bp Premier server you just restored.
  3. Download the Bp Script Runner utility to the test server. This Support article describes how to download Script Runner and run a .bpscript file.
  4. Run the DisablePollingAfterRestore.bpscript file through script runner.

You can now start the Bp Premier test server without polling any production data.

Back up and restore from the command line

You can back up and restore an individual database on the Bp Premier server by using sqlcmd at a command prompt. You could also use sqlcmd if you needed to schedule backups outside of Bp Premier, for example, Your IT support can provide more assistance on using sqlcmd to back up ad restore databases.

To use sqlcmd, you will need to set up your bpsviewer account password. You may need to reapply your database browser password if you have recently upgraded, because the BPSBackup account may not yet be associated with the correct password.

The following are two examples of using sqlcmd:

Back up the active BPSPatients database:

sqlcmd -U BPSBackup -P <pwd> -S \BPSINSTANCE -Q "BACKUP DATABASE <database> TO DISK='<path>'"

Restore a BPSPatients database:

sqlcmd -U BPSBackup -P <bp pwd> -S \BPSINSTANCE -Q "RESTORE DATABASE <database> FROM DISK='<path>' WITH REPLACE"

where:

  • <pwd> = the bpsviewer account password
  • <database> = the name of the database
  • <path> = the path and filename of the backup or restore file.

For example:

sqlcmd -U BPSBackup -P password123 -S \BPSINSTANCE -Q "BACKUP DATABASE BPSPATIENTS TO DISK='c:\backups\bpspatients.bak'"

Troubleshooting

Last updated 25 October 2021

Forums

Webinars

Videos

Training

Subscribe