Choose your language

Choose your login

Support

How can we help?

Lightbulb icon
Lightbulb icon

Here’s your answer

Sources:

Lightbulb icon

Oops!

We currently don’t have an answer for this and our teams are working on resolving the issue. If you still need help,
User reading a resource

Popular resources

Conversation bubbles

Contact us

Manage system backups

This page applies to:

As with any application, it is important to ensure that backups are performed regularly. PaperCut NG/MF includes a built-in database export that saves the state of the database to a file. This functionality complements (not replaces) a good system-wide backup process. The export is stored in the industry standard XML format and compressed using the standard ZIP format to reduce disk space on the server and your backup medium. The use of these open standards ensures that your data is always available and accessible.

As PaperCut NG/MF is centrally managed - the only database that requires backup is on the Application Server. Secondary print servers and Site Servers do not require a database backup.

PaperCut NG/MF makes managing export backups simple by automatically performing a weekly export. Export backup files are placed in the following directory:

[app-path]\server\data\backups

The weekly exports are performed at 20 minutes past midnight on Sunday morning (or as otherwise defined by the schedule.weekly config key. See Using the Advanced Config Editor to find out how to change config keys.)

Performing an online backup

In addition to the automated weekly exports, you can also manually initiate a database export. This might be useful to back up the system database before performing an upgrade. To perform a manual export:

  1. Select Options > Backups. The Backups page is displayed.

  2. Click Export Now. A window is displayed showing the export progress and the location where the export file is saved.

Restoring an export backup

There are a number of situations when it might be necessary to restore a database, including the following:

  • A hardware or system failure requires you to rebuild the server and reinstall PaperCut NG/MF.

  • A new print server was purchased and PaperCut NG/MF is being moved to a new server.

  • To import data into an external RDBMS (see Deployment on an external database (RDBMS) ).

To restore from an export file:

  1. Locate a previous export file.

  2. Stop the Application Server service. (See Stop and start the Application Server ). The database cannot be in use when performing the restore, so the Application Server needs to be stopped first.

  3. Open a command prompt. On Windows systems, this might need to be specifically elevated to run with administrator privileges, even if you are already logged in with an administrator account. Change to the server binaries directory. On a Windows system, the directory location is [app-path]\server\bin\win\.

  4. Re-initialize the database back to an empty state by typing the following: db-tools init-db -f

  5. Run the import process by executing the following. Be sure to replace the example backup path between the " " with your specific backup path.

      db-tools import-db -f "<directory\backup-file-name.zip>"
    

    For instance, if the backup directory and file is c:\program files\PaperCut\backup\backup.zip, the command will be:

      db-tools import-db -f "c:\program files\papercut\backup\backup.zip"
    

    (Or, /ng-mf/db-tools on some systems. See Database tool (db-tools) for more information on using db-tools.)

    For macOS/Linux platforms, there are some extra steps listed below

    On macOS and Linux, you need to ensure that the proper permissions are applied to the backup file, and that the backup file is relocated into the PaperCut MF or PaperCut NG directory (so that the papercut user account can access the backup zip file):

    a. Ensure the proper permissions are applied for access to the file:

      chown papercut:admin \path\to\backup\backup-file-name.zip
    

    b. Move the file into the PaperCut MF or PaperCut NG root directory:

      sudo mv /path/to/backup/backup-file-name.zip /Applications/PaperCut\ MF
    

    c. Run the import-db command as detailed above:

      /ng-mf/Applications/PaperCut\ MF/server/bin/mac/db-tools import-db -f /Applications/PaperCut\ MF/backup-file-name.zip
    
  6. After the import has completed, restart the Application Server service (see Stop and start the Application Server ).

Performing an offline backup

Performing an online backup (as discussed above) is a simple and convenient process, but it is sometimes necessary to perform a backup when the Application Server is not running. For example:

  • to integrate into your existing backup procedures, it might be necessary to write a script or batch file to perform a backup at a known point in time

  • when it is necessary to guarantee that the backup captures all the data. Performing an online export while the system is in use can modify data after the export is complete.

To perform an offline backup:

  1. Stop the Application Server service (see Stop and start the Application Server ). This ensures all data will be captured.

  2. Open a command prompt. On a Windows system change to the following directory:

      [app-path]\server\bin\win\
    
  3. Run the database export process by executing:

      db-tools export-db
    

    (This creates an export file in the system backups directory and the filename named with a timestamp.)

    The export command has additional options that allow you to specify a different directory or filename. See export-db Command for more details.

Export file retention

Export files in

  [app-path]\server\data\backups

are retained for 30 days and then deleted. You can change the number of days on the Options > Backups page under “Keep exports for … days”.

This period is automatically extended should exports not be performed on a regular basis, that is, when automatic exports have been temporarily disabled for a time or when skipping scheduled exports due to a system outage.

Older export files are not deleted unless a number of new exports have been performed. At the very least the latest export file is always retained regardless of its age.

Backup print archive files

By default, the print archive is stored in

  [app-path]\server\data\archive

It is not included in the database exports detailed above. It is recommended that you consider backing up part or all of the print archive with your existing backup processes.

As PaperCut is resilient to partial restoration of the Print Archive, you might want to back up only a month or two worth of archives. There is a README.txt in the archive directory that explains more about partial backups and the directory structure layout.

Back up the Print Deploy configuration

The files created and used for Print Deploy are not included in the nightly PaperCut NG/MF backups. You need to set up your own backup procedure for the Print Deploy configuration files. Back up the following files:

Windows Application server
  <install path>\providers\print-deploy\win\data\
Mac Application server
  <install path>\providers\print-deploy\mac\data\
Linux Application server
  <install path>\providers\print-deploy\linux-x64\data\

Comments