Corrupt Database Problems

Why can PaperCut's database become corrupted?

A full disk or any sort of disk corruption such as those cause by power outages or unexpected system shutdown/failures can corrupt the PaperCut database.

How do I restore a PaperCut database if the database is corrupted?

You will need at least one good backup file from the backup directory [app-dir]\server\data\backups\. To restore the database follow these instructions:

Option 1 - restore via our own backup software

If you have an off disk backup, simply:

  1. Stop the PaperCut Application Server service (Control Panel->Admin Tools->Services), or run the stop-server script in [app-dir]\server\bin\[platform] if running on Linux or Mac.
  2. Restore all files and folders located at: [app-dir]\server\data\internal

Option 2 - restore using one of PaperCut's point-in-time backups

1. Logon to the PaperCut server.
2. Stop the PaperCut Application Server service (Control Panel->Admin Tools->Services), or run the stop-server script in [app-dir]\server\bin\[platform] if running on Linux or Mac.
3. As a backup, take a copy of the [app-dir]\server\data\internal\ directory.
4. Open a command prompt (cmd.exe).
5. Change to the [app-dir]\server\bin\[platform]\ directory. e.g. cd "C:\Program Files\PaperCut NG\server\bin\win\"
6. Run the following command to re-initialize the database: db-tools.exe init-db -f
7. Then restore your backup into the database by doing the following (changing the backup file name as appropriate)
        db-tools.exe import-db "C:\Program Files\PaperCut NG\server\data\backups\export-2009-05-10T00-20-03.zip"
8. Once completed, restart the application server service.

Categories: Backups


keywords: corrupt, database, restore, derby error, database connection error

Page last modified on March 01, 2010, at 06:10 PM