Backing Up SOAPware Data

The SOAPware DataManager is a database utility designed for the Postgres database. It uses existing, tried-and-true utilities provided by Postgres and Windows, but is wrapped up in a simple, easy-to-use interface.

The DataManager allows the user to create and schedule backups, schedule maintenance tasks and perform database restores. Before going live using SOAPware in a production environment, it is important to do a restore test on a different PC/server. Establish a schedule to perform regular test restores in the future and do them anytime there are changes in the system configurations.

SOAPware HIGHLY recommends that all users use Data Manager to create regular backups.



Installing Data Manager

To install Data Manager, see the link here: Installing Data Manager.

Data Manager Changes

The SOAPware Database Service is shut down during a backup - all users must be out of SOAPware before making a backup.

If a user previously scheduled a backup with any version before 2010, this scheduled backup will NO LONGER WORK with 2011 Data Manager. A user need to create a new scheduled backup.

Start the SOAPware Data Manager

Start the SOAPware Data Manager

To Start the SOAPware DataManager, Click Start, All Programs, SOAPware, SOAPware DataManager.

If users are running on Windows Vista or 7, users will need to Right-Click and “Run as administrator."

Opening Screen

Opening Screen

When a user starts DataManager, the user must login with the database administrator password. This defaults to the postgres user account on the database. (This is the second set of passwords created during the SOAPware Data Server install).

NOTE: The database administration password is NOT the same as the SOAPware Administration password. The database administration account only accesses the Postgres database.


Only use the Advanced section if the server, port, or database administration user name, is different than the default install.

* Server: Host name or IP address where database is running. Defaults to localhost.

* Port: Port number where database is listening. Defaults to port 5432.

* User Name: The administration user on the database. User must have administration privileges. Defaults to postgres.



The backup routine creates a copy of the user's data folder. It contains all the user, tablespace, table and data information needed to restore the user's database completely.

Backup file sizes can range from about 50MB to many Gigabytes, depending on database size and compression options.

It can take from 20 minutes to several hours for a backup to complete. SOAPware cannot be used while the backup is running. Please plan to schedule backups to run nightly for the best results.

* Backup Name: Users should use any name which is meaningful, for a backup name.

* Append Current Date: Will attach a date stamp of when the backup was run. If checked, new backup files will be created each day creating multiple backups. This helps ensure the user's data, but a user must also delete old backup files every so often to prevent the backups from taking all the space on the drive. If this is not checked, the backup will overwrite the last backup each time.

* Select Location: Users should choose the folder where the backup file to be placed.

* Set Backup Schedule: This header is collapsible. Click it to view or hide scheduling options.

See the Scheduling section below for more details on setting a backup schedule.

* Backup Now Button: Click this button to run a backup using the settings on this tab.

Note: A backup can be canceled. It will delete the current backup file and a user's database is not affected. If a backup is canceled, go to Start > Programs > PostgreSQL 8.x, and Click Start Service.




The DataManager can take a previously made backup file and restore the database to the exact state as when the backup is made.

Note: After the restore is completed, any user passwords or preferences changed since the backup will be reset to previous state.

* Select Backup File: Choose the backup file created by the DataManager to run a restore.

* Restore Button: Click this button to start the restore.

If restoring a compressed backup file, the DataManager needs to decompress the backup to the PostgreSQL data directory. The data folder can take as much as seven times the compressed file size needed in hard drive space. For example, a 3GB compressed backup may need an extra 20GB of hard drive space to run the recovery.

If a restore is tried and there is not enough room to decompresses the file, the recovery will fail and must be restarted. Simply make more room, or re-install the SOAPware PostgreSQL Data Server to another drive with more space and restore to it.

Note: Users must wait 10 minutes between creating a backup and running a restore in order to clear out the connections.

Warning: Running a restore will replace all the data and table structures of a user's database.

The old database will be deleted.

The process cannot be canceled.




Databases need to be optimized and cleaned up routinely for maximum performance. Higher traffic databases should be optimized more often, sometimes daily. Lower traffic databases may only need to be optimized once a week or month.

Optimizations may take from 30 minutes to several hours to complete.

* Run All Optimizations: Perform each optimization. (Recommended)

* Update Statistics: Resets all table statistics, row counts, etc.

* Clear Unused Space: Useful after many deletes to reclaim space left behind.

* Reset Indexes: Refreshes table indexes to help data retrieval.

* Set Maintenance Schedule: This header is collapsible. Click it to view or hide scheduling options. See the Scheduling section for more details on setting a maintenance schedule.

* Optimize Now Button: Click button to perform selected optimizations.

Note: Running optimizations may degrade database performance. We recommend setting a Maintenance schedule to run at night or weekends when database traffic is low.



* Database Install Path: The DataManager uses Postgres utilities for backup and restore. This path should not be changed unless the Postgres install path is different than listed.

* Service Name: The service name is the name of the SOAPware PostgreSQL Data Server service. Typically, this will be pgsql-8.3

Go to Start > Programs > PostgreSQL 8.x, a user will see either PostgreSQL 8.3 or PostgreSQL 8.2. The service name will either be pgsql-8.3 or pgsql-8.2 depending on which version a user has.

* Service Account: This is the windows user that starts the SOAPware PostgreSQL Data Server after the backup is complete. This should always be postgres.

* Compress Backup: This option compresses the backup file as it is being written. Use this option to keep file sizes at a minimum.

* Data Manager Password: Use this to change the database administration password.

Note: The database administration password is NOT the same as the SOAPware Administration password. The database administration account only accesses the Postgres database.

Scheduling Backups and Maintenance

The DataManager provides an easy-to-use interface to create a Windows Task scheduled event to run a user's backup and maintenance routines. Simply setup a backup or maintenance task as outlined above, then choose the schedule frequency. When a user saves the schedule, a user's  task will run at that time.

For advanced users, maintain existing tasks using the Windows Task scheduler. For more information, start here at the Microsoft Task Knowledge Base.

Create a New Scheduled Task

After a user sets the backup or maintenance information, expand the schedule tab by Clicking on the down arrow icon.

Under the Run dropdown, a user can choose the schedule type from Once, Daily, Weekly or Monthly. Different options will appear depending on what type of schedule is selected.

Set the time for the task to run. Set the task to run at a time when there is no database activity.

Name the schedule so it will be unique in the Windows Task Manager. If there is already a task with the same name, it will ask if a user would like to overwrite the existing task.

Run Once

Run Once

This option will run the task only once on the specified day and time.

Run Daily

Run Daily

This option will run the task daily. A user can choose to skip a number of days.

Run Weekly

Run Weekly

Running a task weekly allows a user to choose which days of the week to run. A user may also skip weeks.

Run Monthly

Run Monthly

A Monthly task allows a user to set the task to run once a month on a certain day. A user may check the months to run the task.

Change Existing Schedule

To change an existing schedule, a user would simply setup a new schedule with any new backup or maintenance or schedule data, and give the same schedule name as an existing task. This will overwrite the existing task with the new information.

To find a list of a user's existing schedules, look in the Windows Task Scheduler for the tasks. Go to the Windows Start menu, then open the Control Panel. Open Scheduled Tasks and it will list all the current tasks. A user may edit these directly to change the schedule, but to change the backup or maintenance parameters, a user must use the DataManager and overwrite one of the tasks.

Delete Existing Schedule

To delete an existing schedule, open the Scheduled Tasks control panel as mentioned above. Right click on the task and choose Delete.

Data Manager Log Files

Log files can give the user details on how tasks are running. They provide information about what tables were used and any warnings or errors which may have occurred. Each time the DataManager is used, either in the GUI or in a scheduled task, it will create a log file of the events.

Find the logs where DataManager is installed at: %DataManager Install Path%\Logs

The Logs directory will only keep the last 10 log files so there is no need to clean out this directory or to worry about it filling up. If a user plans to keep a log file for support or other needs, be sure to move it out of this directory, or it could be deleted as more log files are created.

SOAPwareXchangeHL7 and SOAPwareXchange

Users who are running either the SOAPwareXchangeHL7 or SOAPwareXchange, must NOT be running when a backup via Data Manager is running. If a user has a scheduled backup set, then both Xchange and XchangeHL7 must be not be running. This can be accomplished by using the SOAPwareXchangeHL7 & SOAPwareXchange Command Line article to both stop and start around a Data Manager scheduled backup.