PDQ Deploy Database

<< Click to Display Table of Contents >>

PDQ Deploy Database

PDQ Deploy stores all of its data—schedules, package configurations, target lists, preference settings, credentials, deployment history, etc.—in the PDQ Deploy database. This SQLitedatabase is critical to program function.

The database file, database.db, is stored in folder, %ProgramData%\Admin Arsenal\PDQ Deploy.

NOTE: %ProgramData%, which was introduced in Windows Vista and used in subsequent Operating Systems (Windows 7, 8.x, 10, etc), is a special Windows folder designed to hold application-wide (that is, not user-specific) data. By default, Windows marks this folder as hidden so you won't see it when using Windows Explorer. Its default location is %SYSTEMDRIVE%\ProgramData. If you are running PDQ Deploy on Windows XP or 2003 (no longer supported), the default location is %SYSTEMDRIVE%\Documents and Settings\All Users\Application Data.

The PDQ Deploy database is made up of the following files:

File

Description

Database.db

This is the main SQLite database file that holds all of the computers, inventory, collections, reports, etc.

Database.db-shm

Database.db-wal

These files are used by SQLite while accessing the database. They can be deleted without affecting the system as long as no applications or services are accessing the database. If you move PDQ Deploy to another computer, they don't need to be copied to the new computer with the database file, but it won't hurt if they are. However, if you restore a database backup file, you must delete these files. Otherwise, PDQ Deploy will think the restored database file is corrupted.

The database file, database.db, is not removed on uninstall in case the software is reinstalled. If you move PDQ Deploy to another computer, the PDQ Deploy database must be duplicated on the new computer in order to maintain your PDQ Deploy settings and system data. For detailed information on this procedure, see Moving PDQ Deploy to a New Computer.

Database Security

Database Backup Files

Restoring Database Backup Files

Restoring a Database Backup from the Command Prompt

Maintaining the PDQ Deploy Database

Database Security

Your security is very important to PDQ. To that end, we encrypt sensitive information (passwords) when they are stored in the PDQ Deploy database. We use industry standard AES encryption with three separate keys to keep your data safe. One key is built into the application; one key is stored in the database; and the third is stored in the registry. These last two keys are generated when the application is installed and are unique to your system.

Our support staff may ask you to send your database to us in order to troubleshoot a problem. We will never ask you to send us the encryption key stored in the registry, so you can be sure that your passwords are kept secure.

If you need to move your database from one computer to another you should include the encryption key in the registry. (For detailed information on this procedure, see Moving PDQ Deploy to a New Computer.) If the key is lost, then all passwords stored in the database will need to be re-entered. No other data is lost.

Database Backup Files

Each time you install a new version of the PDQ Deploy software, a database backup file is created in the %ProgramData%\Admin Arsenal\PDQ Deploy\Backups folder. The backup file is compressed and is named after the version of the database. For example, Database.6.2.0.0.db.gz.

NOTE: The database version numbers represent the exact version of PDQ Deploy at the time of backup. For example, when upgrading Deploy 6.2.0.0 to 7.1, the existing database is copied to a file called Database.6.2.0.0.db and then, after a small interval, it is archived in the .gz format.

Older backup files can be safely deleted, but you may want to keep the most recent backups in case you need to restore the database.

Restoring Database Backup Files

In the event that your database is deleted or corrupted, you can restore a database backup file.

Locate the backup database file you wish to restore:

1.Click Options > Preferences (or press Ctrl+Comma), then select Database.

2.The backup location of the database is specified in Backup Location. By default, the backup database files are located in %PROGRAMDATA%\Admin Arsenal\PDQ Deploy\Backups.

3.Navigate to the directory indicated in Backup Location or click the Open Folder Location button.

4.Locate the backup file from which you wish to restore. The backup file is named after the version of the database with the date and time the backup was performed. For example a backup of version 9 performed on March 23, 2016 at 2:32 PM will be titled PDQDeploy- 9.1.0.0-16-03-23 1432.db.cab.

Restore the database from the backup:

1.Decompress the database backup file.

Most compression utilities, such as WinZip and 7-Zip, can decompress cabinet files.

2.Rename the file to Database.db or create a copy of the original file and rename it to Database.db.

3.Stop the PDQ Deploy Service.

This is done in Options > Preferences > Background Services, or press Ctrl+Comma then select Background Service. Alternately, you can access services through the Windows Start Menu > services.msc.

4.Overwrite the existing database file in folder %ProgramData%\Admin Arsenal\PDQ Deploy.

5.Delete the Database.db-shm and Database.db-wal temporary files.

WARNING: If you do not delete these files, PDQ Deploy will think the restored Database.db file is corrupt.

6.Start the PDQ Deploy Service.

This is done in Options > Preferences > Background Services, or press Ctrl+Comma then select Background Service. Alternately, you can access services through the Windows Start Menu > services.msc.

Restoring A Database Using a Command Prompt

To restore the PDQ Deploy database using a Command Prompt:

1.Run cmd.exe as Administrator.

2.To view the options available when restoring the database, use the following command: PDQDeploy RestoreDatabase.

This will display all the available databases you wish to restore.

3.Enter the number of the database you wish to restore.

4.(Optional) To automatically restore the most recent database, use the following command instead: PDQDeploy RestoreDatabase -RestoreMostRecent. The database being overwritten will be renamed and left in the same folder.

Maintaining the PDQ Deploy Database

The PDQ Deploy database is essential to the program function; therefore, it is recommended that you perform the following regular maintenance procedures to ensure optimal database performance:

Location of the PDQ Deploy Database

Backing Up the PDQ Deploy Database

Cleaning Up Deployment History

Optimizing the Database

Location of the PDQ Deploy Database

PDQ Deploy stores its database locally (on the PDQ Deploy console computer) in %ProgramData%\Admin Arsenal\PDQ Deploy.

NOTE: %ProgramData%, which was introduced in Windows Vista and used in subsequent Operating Systems (Windows 7, 8.x, 10, etc), is a special Windows folder designed to hold application-wide (that is, not user-specific) data. By default, Windows marks this folder as hidden so you won't see it when using Windows Explorer. Its default location is %SYSTEMDRIVE%\ProgramData. If you are running PDQ Deploy on Windows XP or 2003 (no longer supported), the default location is %SYSTEMDRIVE%\Documents and Settings\All Users\Application Data.

If your console performance is lagging during large deployments, you may consider moving the PDQ Deploy database to a faster disk. For information on this procedure, visit the PDQ Support page at https://support.pdq.com/home and click Submit a Request or email your request directly to support@pdq.com, or click Help > Support > Feedback & Support. You can also browse the PDQ forums for FAQs.

Backing Up the PDQ Deploy Database

Because the PDQ Deploy database stores all package, schedule, and deployment information, it is highly recommended that you regularly backup the PDQ Deploy database. You can setup an Automatic Backup Schedule in the Database page of Preferences. The default backup schedule is weekly on Saturdays at 10:00 PM. The default will also retain 10 compressed backups. (Enterprise mode required)

By default, the PDQ Deploy database is located at %ProgramData%\Admin Arsenal\PDQ Deploy\Database.db. To protect your system data, configure your backup software to regularly back up this file.

NOTE: To determine the location of the PDQ Deploy database, click Options > Preferences or press Ctrl+Comma, then select Database. The Database field displays the path and filename for the PDQ Deploy database. The Backup location displays the path and filename for the backup database files.

To change the PDQ Deploy database backup defaults, perform the following:

1.Click Options > Preferences or press Ctrl+Comma, then select Database.

2.Make the appropriate changes in the Database Preferences window:

Option

Description

Enable automatic backups

Enables the PDQ Deploy automatic backups feature. This is enabled by default.

Schedule

Displays the current schedule for the automatic backup. Clicking the Edit Schedule button will open the Select Trigger window to edit the schedule. Additionally, you can click the Delete Schedule button to clear the schedule selection. The default schedule is every week on Saturday at 10:00 PM.

Note: If no schedule is selected, a backup will not be performed regardless of whether Enable automatic backups is selected. A warning at the bottom of the Automatic Backup Schedule section will notify you if this is the case.

 

Once

Schedule once in the future.

Trigger On: Select the one-time backup date.

At: Time

Description: (Optional) Description of the schedule.

Interval

Backs up (and repeats) at a set time interval.

Every: Select backup interval by day and/or hour.

Starting: Select first schedule date.

At: Time

Ending: (Optional) Date that the schedule ends. Select to enable the end date.

At: (Optional) Time

Description: (Optional) Description of the schedule.

Daily

Backs up every day at the same time.

At: Time

Starting: Date that the schedule starts.

Ending: (Optional) Date that the schedule ends. Select to enable the end date.

Description: (Optional) Description of the schedule.

Weekly

Backs up every week at the same time on selected days of the week.

On: Day or days that the backups occur.

At: Time

Starting: Date that the schedule starts.

Ending: (Optional) Date that the schedule ends. Select to enable the end date.

Description: (Optional) Description of the schedule.

Monthly

Backs up every month at the same time on selected days.

Trigger Enabled: Enables the schedule trigger for use (selected by default).

Every Month

On Day: The day (or multiple days) of the month (for example, 1st, 12th, 23rd, Last, etc.)

Or

On The: The nth (for example, 1st, 2nd, Last, etc.) day of the month (for example, All, Weekend Days, Sunday, Monday, etc.)

TIP: Days of Month: If you select the 29th, 30th, or 31st of the month, the backup won't occur in months without those days. Use Last to  always deploy on the last day of the month. Can be mixed with Weeks of the Month.

TIP: Weekdays/ends of Month: Different combinations of weeks and days are not available (for example, the 1st Monday and the 2nd Friday.) Selecting the 5th day(s) won't deploy in a month without a fifth week. Use Last to always deploy on the last week of the month. Can be mixed with Days of the Month.

At: Time

Starting: Date that the schedule starts.

Ending: (Optional) Date that the schedule ends. Select to enable the end date.

Description: (Optional) Description of the schedule.

Backup Location

Displays the path where backup files are stored. The default location is C:\ProgramData\Admin Arsenal\PDQ Deploy\Backups. Click the Open Folder Location button to view the location of the backup.

NOTE: The backup file is named after the version of the database with the date and time the backup was performed. For example a backup of version 9 performed on March 23, 2016 at 2:32 PM will be titled PDQDeploy- 9.1.0.0-16-03-23 1432.db.cab

Backups to Keep

Specifies the number of most recent backup files to keep. Setting this to 0 will save all backups. The default setting is 10.

 

Compress backups

Automatically compresses each backup to save space. This is enabled by default.

Backup Now

Backs up immediately instead of waiting for the next scheduled backup.

Last Backup

Displays the date and time of the last database backup as well as how long ago the backup was performed.

Next Backup

Displays the data and time of the next backup as well as how long until the next backup is performed.

Cleaning Up Deployment History

Every time PDQ Deploy runs a deployment, it records the results in the PDQ Deploy database. Each deployment record takes ~5KB of memory. While individually this is a negligible amount, given time and thousands of deployment records, the deployment history can consume significant disk space. For example, in our labs, the deployment history for 6,200 deployments required 32 MB of disk space. The more data in the database, the slower the database will become.

To help you manage the disk space consumed by the PDQ Deploy database, you can configure PDQ Deploy to automatically purge deployment history records after a specified number of days. You can customize this value based on the number of deployments you run and how long you wish to see the results of finished deployments. The default age is 30 days, i.e. one month after the deployment finishes.

Setting the cleanup to 0 days disables automatic cleanup; PDQ Deploy never deletes the deployment results.

WARNING: Keeping this value high or setting the value to 0 may cause the PDQ Deploy database to get very large which could slow PDQ Deploy performance.

To specify how many days you want to archive deployment histories in the PDQ Deploy database before they are deleted:

1.Click Options > Preferences or press Ctrl+Comma.

2.In the Preferences window, click Deployments.

3.Set the Cleanup field to the number of days you want to maintain the deployment history before they are deleted.

4.Click Close.

Optimizing the Database

When PDQ Deploy deletes information from the PDQ Deploy database, it leaves empty space in the database file which takes up a few bytes. Over time, this space adds up and may impact database performance. Therefore, it is recommended that, on average, you optimize the PDQ Deploy database once a month. Optimizing the database frees up the empty space and gets rid of fragmentation.

NOTE: If you are running a high volume of deployments and you have configured PDQ Deploy to clean up the deployment history <30 days, you may want to optimize the PDQ Deploy database more frequently.

NOTE: PDQ Deploy automatically optimizes the database when the application is upgraded.

To optimize the PDQ Deploy database:

1.Click Options > Preferences or press Ctrl+Comma.

2.In the Preferences window, click Database.

3.Click Optimize Database.

NOTE: PDQ Deploy warns that the console and background service will be stopped, which will abort any running deployments.

4.Click OK to continue.

PDQ Deploy opens a command line window to run the optimization command.

5.When the optimization completes, press Enter to close the command line window.

PDQ Deploy automatically restarts and opens the Preferences window.

6.Click Close.

 

 

 

© 2019 PDQ.com Corporation. All rights reserved.

PDQ.com is a trademark of PDQ.com Corporation. All other product and company names are the property of their respective owners.

Help Version: 18.0.18.0