Back up and restore Bp Premier

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

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

  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. IMPORTANT  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.

  4. On Windows 8 or later, select Windows logo > AppsBP Backup.
  5. The BPS Backup Utility window will appear.
  6. Click Restore database. Bp Premier will prompt that restoration will replace all current data. Click Yes.
  7. Log in to the restore utility with a Bp Premier username and password.
  8. Browse to the folder where the backup file is stored that you wish to restore.
  9. 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.

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

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