How to back up the Print Director database
How to back up the Print Director database
All of Print Director’s settings, users and transactions are in its SQL Server database, normally called PDDB2. Back it up regularly. If your database is on a SQL Server that is already backed up by your IT team, check that PDDB2 is included, and you may not need either method below.
Back up now with DBTools
-
On the database server, open DBTools (in the Windows Start menu, under Print Director).
-
In the Connection Settings window, enter the Server Name. Then either:
- leave Trusted Connection (Windows Authentication) ticked, if your Windows account may back up databases on that server; or
- untick it and enter the sa user name and password, which can always back up.
The PDUser account that Print Director normally connects with cannot make backups.
-
Click OK, then Backup Database.
-
In the Backup Database window, check the Database (normally PDDB2). The Backup file name starts as the database name and today’s date, and the Backup folder as SQL Server’s own backup folder. To save it somewhere else, click the … button next to Backup folder.
-
Click Backup.
Back up every night with a scheduled task
This creates a small batch file that backs up the database, and a Windows scheduled task that runs it every night. The examples save both in C:\Backups\; you can use any folder.
Create the batch file
- Create the folder, for example
C:\Backups\. - Open Notepad, and paste in one of the scripts below. Change the values in the set lines to match your server.
- Click File > Save As, set Save as type to All Files (*.*), and save it in the folder as BackupPDDB2.bat.
If you have the sa password, use this script. It assumes the default SQL Server instance and that sqlcmd.exe can be found (SQL Server normally sets this up):
echo off
cls
echo -- BACKUP DATABASE --
set DATABASENAME=PDDB2
set BACKUPFILENAME=C:\Backups\%DATABASENAME%.bak
set SERVERNAME=(local)
set USERNAME=sa
set PASSWORD=ChangeMe123
echo.
sqlcmd.exe -U %USERNAME% -P %PASSWORD% -S %SERVERNAME% -d master -Q "BACKUP DATABASE [%DATABASENAME%] TO DISK = N'%BACKUPFILENAME%' WITH INIT, NOUNLOAD, NAME = N'%DATABASENAME% backup', NOSKIP, STATS = 10, NOFORMAT"
echo.
If the scheduled task will run as a Windows account that is a member of the SQL Server sysadmin role, you do not need a password in the file. This script uses Windows authentication instead, and a named instance called PD:
echo off
cls
echo -- BACKUP DATABASE --
set DATABASENAME=PDDB2
set BACKUPFILENAME=C:\Backups\%DATABASENAME%.bak
set SERVERNAME=(local)\PD
echo.
sqlcmd.exe -E -S %SERVERNAME% -d master -Q "BACKUP DATABASE [%DATABASENAME%] TO DISK = N'%BACKUPFILENAME%' WITH INIT, NOUNLOAD, NAME = N'%DATABASENAME% backup', NOSKIP, STATS = 10, NOFORMAT"
echo.
If more than one version of SQL Server has been installed and the script fails to find the right sqlcmd.exe, use its full path in place of sqlcmd.exe.
Test the batch file
Right-click BackupPDDB2.bat and click Run as administrator. After a few minutes (longer for a large database), PDDB2.bak appears in the folder.
If the window closes before you can read an error, add a line with pause at the end of the file and run it again. Remove the pause line when it works.
Create the scheduled task
- On the server, open Task Scheduler (in Server Manager, Tools > Task Scheduler).
- Click Task Scheduler Library, then Create Basic Task… on the right.
- Enter the Name PDDB2 backup, and click Next.
- Leave the trigger on Daily, click Next, and set a start time after hours, for example 11 PM. The backup can use a lot of resources on a large database, but Print Director keeps working; there is no downtime. Click Next.
- Leave Start a program, click Next, browse to the batch file, and click Next.
- Tick Open the Properties dialog for this task when I click Finish, and click Finish.
- In the task’s properties, under Security options, choose Run whether user is logged on or not, tick Do not store password (the task needs no network access), and click OK.
Test the scheduled task
Delete the backup file from your earlier test. Then, in Task Scheduler, right-click the task and click Run, and check that the backup file appears again.
Copy the backup file somewhere off the server regularly, so it survives if the server is lost.
Related articles
| Document revision date: 2026/11/10 Software version: 2.5.15.3 |
