Advanced Archiving Options and Features

Changing the archive storage directory

The default archive storage location is [app-path]/server/data/archive. Reasons for changing this location may include:

  • Allowing site servers and secondary print servers to archive to a common location.

  • Storage restrictions on the drive where PaperCut is installed.

  • You want to exclude the archive from your backups.

Note

For performance and security reasons using a local disk on the primary server as the storage location is recommended. If a remote network location such as a SAN device is intended to be used, we'd recommend a low-level drive mount such as iSCSI or better if possible. The server must have a reliable connection to the storage.

On a Windows server, if the desired location is accessible only via a UNC path, some additional security configuration will be required. By default the PaperCut Application Server and the PaperCut Print Provider services run under the SYSTEM account. This account is restricted and does not have remote network drive access. You'll need to change the Log On account assigned both services to one which has full read/write access to the remote location. The change should only be considered and performed by an experienced Windows server administrator.

Phase 1: Moving the central archive:

Important

If you have existing archived spool files you wish to move to the new location, it is recommended to perform this process at a period of low printing activity.

To change the location:

  1. Create the new directory in the desired location, e.g. D:\print-archive. (If the PaperCut Application Server is running in a cluster this directory must be accessible by all cluster nodes. See Chapter 28, Clustering and High Availability.)

  2. Ensure the PaperCut Application Server service will have read and write access.

  3. Log into the PaperCut admin interface.

  4. Navigate to OptionsActionsConfig Editor (Advanced).

  5. Search for the key archiving.path.

  6. Enter the new path (e.g. D:\print-archive).

  7. Click the Update button to the right of the value.

  8. Navigate to the Options page and verify the Archive status.

  9. A README.txt file should now appear in the top level of the location.

  10. Consider copying any existing archived content from the previous archive location. If existing content is not copied, job previews will no longer appear for historical print jobs.

Phase 2: Changing Print Provider Configuration:

The print provider component needs to know the new location. To set this location:

  1. Open Notepad (or your preferred text editor) with Administrator rights.

  2. Open the file located at [app-path]/providers/print/win/print-provider.conf.

  3. Locate the line:

    ArchiveDir=

    and change the value to point to the new location set up in Phase 1. For example:

    ArchiveDir=D:\print-archive

    Note: if you have upgraded from an older version you may need to add the ArchiveDir= option to the print-provider.conf.

  4. Save the file.

  5. Restart the print provider service.

  6. Note: If you have multiple print servers, repeat this on any other secondary print server or site server, as outlined in the section called “Setting up Secondary Print Servers or Site Servers”.

Backup Considerations

The print archive can potentially grow to a large size and this can have implications for your backup planning. You have various options around archive backup:

  • You can opt to to fully backup the directory using your backup solution of choice, provided you have sufficient capacity.

  • You can opt to not backup the directory at all. PaperCut will be resilient to a restoration with an empty archive directory.

  • You can opt to back up part of the directory. For example the current month only. PaperCut will be resilient to a restoration with a partially constructed archive directory. There is a README.txt in the archive directory that explains more about partial backups and the directory structure layout.

Setting up Secondary Print Servers or Site Servers

Introduction

The setup described previously was for the common case where the PaperCut application is installed on a single server. The secondary print server (or a site server's print server), as explained in Chapter 19, Configuring Secondary Print Servers and Locally Attached Printers, is responsible for managing the contents of the print jobs printed via a server other than the primary server. If Print Archiving is enabled, the secondary server must also participate and facilitate archiving.

In larger print environments it is common to have multiple PaperCut secondary servers located on various machines across the network. In this case Print Archiving can still be used, however this is an advanced setup procedure and will require additional planning and implementation time.

To support the central tracking and viewing of print archives, all spool files need to be transferred across to the primary application server's central archive directory. Each secondary server needs to be correctly configured with write access to this central archive directory. This will require running the PaperCut Print Provider service under an account with write access to this directory.

One consequence of this approach, designed to simplify the management of archives, is that it increases bandwidth requirements because all print archives are transferred across the network to the application server. The impact of this will depend on your specific environment, e.g. number of print jobs, network setup, PDL used, etc. As such you may need to monitor and experiment before a large scale deployment of this feature.

The Setup process

The process to set up a secondary server under Print Archiving involves four key phases. Before undertaking this process you should ensure that the secondary print server or site server is operating correctly for standard print tracking. The following section documents configuring secondary servers on the Windows operating system.

Phase 1: Creating domain service account

By default the PaperCut Print Provider service running on the secondary server(s) operates under a limited rights account called SYSTEM. This account does not have access to network resources and hence can't access the file system on the primary PaperCut server. You'll need to create a new service account and set the service to Log On as this account:

  1. Create a new domain account with access to the share on the primary server and full management rights of print spooler on the local machine. An appropriate name may be svc-papercut.

  2. Set the new account's password to never expire.

Phase 2: Sharing the central archive directory

The secondary server needs the ability to copy print jobs into the central archive. You must first share the central archive folder. On Windows, assuming the archive directory is the default, the procedure would be:

  1. Open Explorer and navigate to [app-path]/server/data/.

  2. Right-click on the archive directory and select Properties...Sharing.

  3. Share the directory with a name print-archive.

  4. Ensure the service account created in Phase 1 has full read/write access.

  5. Ensure all other non-Administrator users do not have any access.

  6. Click OK.

Phase 3: Change the configured archive path on the secondary server

The secondary server needs to know the location of the recently shared central archive directory. To set this location:

  1. Log on to the secondary print server or site server as an administrator.

  2. Open Notepad (or your preferred text editor) with Administrator rights.

  3. Open the file located at[app-path]/providers/print/win/print-provider.conf.

  4. Locate the line:

    ArchiveDir=

    and change the value to point to the UNC share name set up in Phase 2.For example:

    ArchiveDir=\\my-primary-server\print-archive

    Note: If you have upgraded from a previous version you will need to add the ArchiveDir=option to theprint-provider.conf.

  5. Save the file.

Phase 4: Assigning rights to the service account

The PaperCut Print Provider service (service responsible for monitoring the print queues and transferring print job spool files to the central archive) needs to be able to access the directory shared in Phase 3. Assign the service account set up in Phase 1 to the PaperCut Print Provider service as follows:

  1. Open Control PanelAdministrative ToolsServices

  2. Double-click on the PaperCut Print Provider service.

  3. Select the Log On tab.

  4. Click This account.

  5. Enter the username and password for the service account set up in Phase 1.

  6. Click OK.

  7. Restart the service and manually check the file [app-path]/providers/print/print-provider.log for any error messages at end.

Phase 5: Test

Take some time now to perform some testing and ensure any jobs printed on a print queue on this secondary server are correctly archived.

Important

Archived files are partitioned based on the date and time of the print job. In order for the print archives to appear in a consistent manner it is important that all secondary print servers and site servers share a common time synchronization. An inconsistent time between servers of more than one hour may cause an error.

Troubleshooting Secondary Server Setup

Here is a list of common issues leading to problems with Print Archiving and secondary server setups:

  • Incorrect paths: It's important that all secondary servers are configured to point to the shared central archive directory. Double-check the value entered in ArchiveDir. See the section called “Phase 2: Changing Print Provider Configuration:”.

  • System Services can't access user mapped drives. On Windows it's important that you use a UNC path rather than a mapped drive letter.

  • You'll need to ensure that all secondary servers have full write access to the central archive. Take time to double-check permissions.

Advanced Configuration Keys

The following configuration keys are accessed via OptionsActionsConfig editor (advanced) and influence the behavior of Print Archiving

KeyDescription

archiving.images.creator.non-interactive.max-concurrent

This value determines the maximum number of image creator processes used to process new print jobs in the background. The system may use this maximum number when it is under high load. The default value is 1. Sites running on fast multiprocessor servers may choose to increase this number. As a guide, this value should not exceed the number of available processor cores.

NOTE: The Application Server must be restarted after changing this setting.

archiving.images.creator.interactive.max-concurrent

This value determines the maximum number of image creator processes that may be used to support interactive viewing of print jobs in the admin interface. The default value is 2. Sites running on fast multiprocessor servers may choose to increase this number.

NOTE: The Application Server must be restarted after changing this setting.

archiving.images.creator.pages-to-initially-image

This value determines the number of pages that will be imaged (pre-rendered) when a print job first arrives. Pre-generation of images speeds up viewing. The default value is 4.

archiving.images.viewer.max-pages

The maximum pages into a document that can be explored.

Table 26.1. Print Archiving Advanced Config Keys

Downloading PDL / spool files for reprinting

Along with image previews, Print Archiving stores a copy of the print job's PDL / spool file. This can be later downloaded and reprinted. Common reasons for reprinting a job include:

  • To produce another hard copy of the print job (e.g. if the original was lost).

  • To view, when image previews are not available (such as when the printer is using a proprietary / GDI print language).

  • To help diagnose or reproduce printing problems.

To download a job's PDL / spool file,

  1. Find the job of interest in the job log

  2. Click on the job's thumbnail to open the job viewer (full page view)

  3. Click the download icon in the toolbar at the top left (see below)

  4. Save the PDL file to your computer

The print job viewer showing the download PDL option in the toolbar

Figure 26.4. The print job viewer showing the download PDL option in the toolbar

For information about how to print a PDL file once it is downloaded, see the FAQ on how to print a PDL file.

Remove archived data

Archived data may be removed permanently by clicking the remove icon or pressing 'delete' in the archive viewer.

Removal is available when the user has the administrator right "remove archived jobs" assigned.

To remove archived data,

  1. Find the job of interest in the job log

  2. Click on the job's thumbnail to open the job viewer (full page view)

  3. Click the delete icon in the toolbar at the top left (see below) or press 'delete' key

  4. Confirm deletion

The print job viewer showing the remove option in the toolbar

Figure 26.5. The print job viewer showing the remove option in the toolbar