Back up your PaperCut NG/MF system regularly to prevent data loss. Depending on your configuration, ensure you back up all system areas so you can perform a full restoration if a failure occurs. This includes the Application Server database, configuration files, certificate stores, and file system components.
Store your backups on a separate device, ideally at a different location. This practice ensures you can recover your data if your primary server room or cloud hosting provider fails.
Whole server backup
Before you upgrade, migrate, or make significant configuration changes to your PaperCut server, perform a full system backup.
A full system backup includes the operating system, all PaperCut files, configurations, data, and the internal database. This backup provides a recovery point so you can restore your system if an error occurs.
How to back up your virtual machine
If you’re running PaperCut NG/MF on a virtual machine, you have a powerful way to protect your entire setup in one go. Using your hypervisor’s built-in snapshot features or a third-party backup tool allows you to capture the “whole box” including the operating system, configuration files, and the database.
Think of this as your ultimate safety net. If something goes wrong during an upgrade or a server move, you can simply “roll back” to exactly how things were.
Before you start
Follow these steps to prepare your virtual machine for a backup and ensure data integrity.
- Stop the PaperCut Application Server and the PaperCut Print Provider services. Stopping the services ensures the system does not write data during the backup process. For more information, refer to Stopping and Starting (Restarting) PaperCut Services.
- Verify that no upgrades, system patches, or large print jobs are in progress.
- Confirm the disk has enough free space for the snapshot or backup image.
Using your backup tools
Whether you are using the tools built into your hypervisor or a dedicated third-party backup suite, we recommend checking your vendor’s specific documentation.
Every tool has its own way of handling snapshots. Their guides will have the most up-to-date instructions on how to schedule these backups and how long you should keep them to ensure you always have a way back if you need it.
Verifying and testing your backup
After you complete the snapshot or backup:
- In the hypervisor or backup console, verify that the backup status is successful.
- Confirm that the backup includes all virtual machine (VM) virtual disks and the PaperCut installation directory.
- Restore the backup according to your organization’s protocol.
- Perform a test restoration in a safe, non-production environment to verify the backup is functional.
- Ensure the test environment is isolated and does not have access to your production environment.
- Restart the PaperCut services and verify the system is functioning correctly. For example, log in to the admin interface and perform a test print.
A test recovery helps you estimate the time required for an upgrade or a potential rollback.
If you use the internal database, you can now proceed with the upgrade, migration, or configuration changes. If an error occurs, use the snapshot or backup to restore the system. If you use an external database, follow the instructions in the next section.
For more information, see:
- Upgrading PaperCut NG/MF (upgrade steps).
- Plan your PaperCut Application Server Migration.
- Database Upgrades.
Database backup
The PaperCut NG/MF Application Server database stores all system data, including user configurations, costs, quotas, print logs, and printer settings. Without a database backup, you must manually reconfigure the entire system if a failure occurs.
PaperCut NG/MF includes a built-in export tool that saves the database state to a file. This tool complements your organization’s system-wide backup process. The system saves exports in an industry-standard XML format and compresses them into .zip files to save disk space.
Because PaperCut NG/MF is centrally managed, you only need to back up the database on the Application Server. Secondary print servers and Site Servers do not require a database backup.
Automatic weekly exports
The system automatically performs a weekly export at 00:20 every Sunday. You can change this schedule using the schedule.weekly config key in the Config Editor. For more information, see Using the Advanced Config Editor.
By default, the system saves these files in the following directory: [app-path]\server\data\backups.
Frequent backups for large networks
If you require more frequent backups, use the server-command tool. You can create a script to run the following command at your preferred interval: server-command perform-online-backup
For more information, see Server commands (server-command tool).
How to manually back up your database
In addition to automatic weekly exports, you can manually export the database at any time. We recommend you perform a manual export before you upgrade the system.
To perform a manual export:
Option 1: Use the Admin web interface
- Log in to the PaperCut admin console.
- Navigate to the Options tab, then select Backups.
- Under Database Export, click Export Now.
A progress window will appear. Once finished, it will display the specific location where your backup .zip file has been saved.
Option 2: Use the Command Prompt or Terminal
While the web interface is the easiest way to grab a backup, using the command line is a powerful alternative. This method is especially useful if you want to automate your backups with a script or if you need to perform a backup using command line.
Backup while the PaperCut Application Server is running (online)
-
Open the command line tool on your PaperCut Application Server:
- Windows: Open the Command Prompt (
cmd.exe). Elevated with administrator privileges. - macOS or Linux: Open the Terminal and run
sudo su - papercut.
- Windows: Open the Command Prompt (
-
Navigate to the
bindirectory where the PaperCut backup tools are located:- Windows:
[app-path]\server\bin\win\. - macOS or Linux:
[app-path]/server/bin/[platform]/.
- Windows:
-
Run the following command:
server-command perform-online-backup
Note that the online backup runs while the Application Server is active, which means data could potentially be modified after the export begins. If you need to ensure a perfect “point-in-time” snapshot, consider performing an offline backup by stopping the Application Server first.
Backup while the PaperCut Application Server is not running (offline)
-
Stop the PaperCut Application Server service. For instructions, see Stopping and Starting (Restarting) PaperCut Services.
-
Open the command line tool on your PaperCut Application Server:
- Windows: Open the Command Prompt (
cmd.exe). Elevated with administrator privileges. - macOS or Linux: Open the Terminal and run
sudo su - papercut.
- Windows: Open the Command Prompt (
-
Navigate to the
bindirectory where the PaperCut backup tools are located:- Windows:
[app-path]\server\bin\win\ - macOS or Linux:
[app-path]/server/bin/[platform]/
- Windows:
-
Run the following command:
db-tools export-db
The system creates a backup .zip file in your standard backups directory, for example, [app-path]\server\data\backups. The file name includes a timestamp.
Tip: The db-tools command has extra options if you want to save the file to a specific location or give it a custom name. For more details, check out the export-db Command guide.
How to back up an external database
If you use an external database (RDBMS), such as Microsoft SQL Server, PostgreSQL, or Oracle, you can use the database engine’s native backup tools.
Using native tools is often faster than the PaperCut export and import process, especially for large databases. For instructions on how to perform a native backup, refer to your database provider’s documentation.
We also recommend you use the backup methods described in the previous section and the restoration procedures in the following section.
How long backups are kept
By default, PaperCut NG/MF stores database export ZIP files in the [app path]\server\data\backups folder for 30 days. You can adjust this time on the Options > Backups page in the “Keep exports for … days” setting.
If exports stop because you turned off automatic backups or the system went offline, the software keeps the files longer. Old files are only removed after the system successfully creates new ones. The most recent export file always stays on the server no matter how old it gets.
How to restore your database from a backup
You might need to restore a database in the following situations:
- A hardware or system failure requires you to rebuild the server and reinstall PaperCut NG/MF.
- You move PaperCut NG/MF to a new server.
- You want to import data into an external RDBMS. For more information, see Deployment on an external database (RDBMS).
Restore from an export file
-
Locate the
.zipfile you want to restore. This file is usually in[app-path]\server\data\backups. -
Stop the PaperCut Application Server service. For instructions, see Stop and start the Application Server.
Note: You must stop the service before you perform a restore because the database cannot be in use. -
Open the command-line tool for your operating system:
- Windows: Open the Command Prompt (
cmd.exe) as an administrator. (Right-click Command Prompt in the Start menu, then select Run as administrator). - macOS or Linux: Open the Terminal.
- Windows: Open the Command Prompt (
-
Navigate to the
bindirectory:- Windows:
[app-path]\server\bin\win\ - macOS or Linux:
[app-path]/server/bin/[platform]/
- Windows:
-
Re-initialize the database to an empty state by running the following command:
db-tools init-db -f -
(macOS and Linux only) Ensure the
papercutuser account can access the backup file:-
Apply the correct permissions to the file:
chown papercut:admin /Applications/PaperCut MF/server/data/backups/backup-file-name.zip -
Move the file into the PaperCut NG/MF root directory:
sudo mv /Applications/PaperCut MF/server/data/backups/backup-file-name.zip /Applications/PaperCut MF
-
-
Import the backup data by running the following command. Replace the example path with the path to your specific backup file:
db-tools import-db -f "folder\backup-file-name.zip"Example (Windows):
db-tools import-db -f "C:\Program Files\PaperCut MF\server\data\backups\backup-file-name.zip" -
Restart the PaperCut Application Server service.
For more information on using these tools, see Database tool (db-tools).
Individual files and folder backup
While the database holds your logs and user accounts, PaperCut NG/MF also stores important information in various files within its install folder. If you are unable to perform a full server snapshot or VM backup, you can manually ensure the most important parts of your PaperCut environment are protected. While the database stores your logs and users, the files listed below hold your specific server identity, security settings, and customizations.
For a complete recovery, make sure your backup software is capturing these key locations:
- Server configuration:
[app-path]\server\server.propertiesand[app-path]\server\security.properties. - Primary data & database:
[app-path]\server\data\. - Custom branding & SSL:
[app-path]\server\custom\. - Custom drivers & plugins:
[app-path]\server\lib-ext\. - Print Provider & hardware settings:
[app-path]\providers\. - User Client customizations:
[app-path]\client\. - Job Ticketing configurations:
[app-path]\job-ticketing\.
While you can pick and choose folders, it is much simpler and safer to just back up the entire PaperCut installation directory (e.g. C:\Program Files\PaperCut MF\). This ensures that no matter how much you’ve customized your environment, nothing gets left behind.
Mobility Print
If you’re using PaperCut Mobility Print, keep in mind that it usually lives in its own folder outside of the main Application Server directory (e.g. C:\Program Files\PaperCut Mobility Print\). Be sure to include this in your backup routine to keep your settings safe.
Print Archive files
If you’ve enabled Print Archiving, the images of printed documents are stored directly on the disk rather than in the database.
- Location:
[app-path]\server\data\archive.
Tip: Depending on how much your team prints, this folder can get quite big! Make sure your backup location has plenty of space to house these files.
Print Deploy configuration
The settings, zones, and drivers you’ve set up in Print Deploy are not included in the standard database backup. To make sure you don’t have to rebuild your deployment zones from scratch, back up the following folder:
- Windows:
[app-path]\providers\print-deploy\win\data\. - macOS:
[app-path]\providers\print-deploy\mac\data\. - Linux:
[app-path]\providers\print-deploy\linux-x64\data\.
Comments