Skip to content

Backups and moving servers

CVN PSA backs up its own database and files on a schedule. A backup you have never restored is not proof of anything, so the app can also test-restore one for you.

Set up backups

  1. Open Configuration › Maintenance › Backups.
  2. Choose how often to run: every six hours, daily or weekly, and the time of day.
  3. Include stored files as well as the database. A database-only backup restores a system with no documents or attachments.
  4. Set an encryption passphrase. Backups are compressed and encrypted with AES-256. Without a passphrase they are written unencrypted, and the backups screen says so.
  5. Store the passphrase outside the server. A key kept only on the machine you need to restore is no help.
  6. Set how many days to keep archives. The default is 30. Older archives are deleted after each run.

The backups screen lists every run, and lets you start a backup, verify an archive or download it.

Test restores

Verify checks that an archive file is intact. Restore test goes further: it restores the database into a scratch database and checks that it comes back. Turn on the weekly restore test in the backup settings, or start one from the backups screen.

Time a full restore once a quarter and write the number down. That is your real recovery time.

Restore a backup

Restoring over a live database is deliberately a command-line job, so it cannot happen from a stray click:

  1. Sign in to the server and change to the app's directory.
  2. Put the app into maintenance mode with php artisan down.
  3. Run php artisan psa:backup:restore and pick the backup from the list. Add --id= or --file= to name one directly.
  4. Confirm. Run it with --force in a script.
  5. Run php artisan up and check a few recent tickets and invoices.

Move to a new server

  1. Prepare the new server. Run the installer (ships with version 1.0) on it using the same release version as the old server.
  2. Copy the keys. Copy the application keys from the old server's .env file to the new one: APP_KEY, SETTINGS_KEY, and PASSWORD_VAULT_KEY if it is set. Settings, stored credentials and the password vault are encrypted with these keys and cannot be read without them.
  3. Take a final backup on the old server, with files included, and stop the old app.
  4. Restore the database backup on the new server, then copy the app's storage directory across so documents and attachments come with it.
  5. Point DNS at the new server and get a certificate.
  6. Check sign-in, a ticket, an invoice PDF, outgoing mail and email-to-ticket.

If the domain stays the same, your licence needs no change. If it changes, move the licence to the new domain from your account first. See Licences, domains and renewals.

Edit or report a problem