How do I retain my data when restoring my PaperCut Application Server?
Source: https://www.papercut.com/kb/Main/PO-1216-and-PO-1219#faqs
How do I retain my data when restoring my Application Server?
Depending on how far back you need to restore your backup from, you may want to restore balances or other data changes in the gap between the last safe backup, and now.
There’s some options for the restore process and subsequent data retention below:
- Restore App Server and Database to a clean backup (Recommended option)
- This would involve restoring the Application Server and database from a ‘safe’ backup point prior to when you discovered any suspicious behavior.
- If you don’t require the data changes between the safe backup and now, you’re all set.
- Restore App Server and Database, then update user balances (Safe option)
- To restore recent user balances, we recommend restoring the latest (current) database backup containing all of the latest data, onto a staging machine that’s running a patched version of the Application Server, and is not connected to the network. You can then use this environment to export your user balances, and then import them into the production (restored) system.
- To export user balance / user credit data from your off-network system, run a user report - e.g. in the PaperCut MF/NG admin interface, head to Reports > User > User reports > User list then select the CSV report format. This will generate a list of your users and their current balances.
- Then use the detailed information on the Batch import and update user data article to format the data into the correct columns, then import/update the data in your production system.
- Restore App Server, and retain your most recent database
- If you need to keep all your reporting data as well as user balance data and other changes to the database, you will need to manually clean a copy of your potentially compromised database.
- We recommend restoring the latest (current) database backup containing all of the latest data, onto a staging machine that’s running a patched version of the Application Server, and is not connected to the network.
- On that system, ensure that you clean/check the following:
- Set config key print-and-device.script.enabled is set to N (if you’re not using print or device scripting)
- Set config key device.script.sandboxed is set to Y (the recommended default)
- Set config key print.script.sandboxed is set to Y (the recommended default)
- Delete any device scripts or print scripts which have been configured, in case they have been tampered with.
- Ensure that your user lists and other PaperCut MF/NG settings match with what you expect to see in your environment.
- Once you are confident that the staging machine settings are clean, perform a database export from the staging environment, then import that cleaned database data into the production environment.