Host Backups

Host backups provide a complete snapshot of a Centova Cast server's database and stream accounts, allowing a quick, complete recovery in the event of a hardware failure or similar.

Creating a Host Backup

Host backups are created using Centova Cast's simplebackup script. This script is invoked as /usr/local/centovacast/sbin/simplebackup with the following parameters:

  • --host=HOSTNAME
    Specifies the hostname of the remote server to receive the backup. If omitted, the backup is created on the local server.

  • --port=PORT
    Specifies the SSH port for the remote server to receive the backup; 22 is used by default.

  • --user=USERNAME
    Specifies the SSH username for the remote host; root is used by default.

  • --path=PATH
    Specifies the path on the local or remote server to receive the backup.

  • --delete
    Specifies that everything in the target directory specified by --path should be deleted when the backup runs. This will remove old user files (for example, files from deleted accounts) from the backups, which is generally a good idea. Beware, however, that if you specify the wrong path, it will delete everything in the path you specify.

Example invocation:

/usr/local/centovacast/sbin/simplebackup --host=remote.example.com --port=22 --user=root --path=/opt/castbackup

Automating Host Backups

This script is well-suited for creating automated nightly or hourly backups of a Centova Cast server via a cron job.

For automated/unattended operation with a remote server, an account on the remote server must be configured for SSH public key authentication. Typically this just involves logging in to the local server as root, and running:

ssh-copy-id root@<hostname-of-remote-server>

Further instructions for setting up public key authentication are available here.

After the remote server is configured for public key authentication via SSH, a cron job can be created on the Centova Cast server such as:

15 0 * * * root /usr/local/centovacast/sbin/simplebackup --host=remote.example.com --port=22 --user=root --path=/opt/castbackup

This example cron job will back up the Centova Cast server at 15 minutes after midnight each night.

Restoring a Host Backup

Restoring a host backup largely just involves installing a fresh copy of Centova Cast on a server and then performing the steps documented in the Centova Cast migration instructions, starting from step 7.

Note that in the migration instructions, "Server A" refers to the host on which the backup files are located, and "Server B" refers to the host on which you are restoring Centova Cast. Also note that your database backup (referenced in step 8) is saved in a file named centovacast_backup.sql in the backup directory.


Previous: Account Backups
Section: Backups
Next: Credits