Procedure to backup and restore Cyberwatch

Backup Cyberwatch

With a snapshot

You can make a Cyberwatch backup by taking a snapshot of the Cyberwatch machine.

If you are using several Cyberwatch instances taking a snapshot of the master instance is enough.

By doing a backup of Cyberwatch data

Cyberwatch configuration files are stored in folder /etc/cyberwatch. Cyberwatch recommends to backup these files and the content of the database.

Backups of images and containers is not necessary because these objects are automatically downloaded when Cyberwatch restarts.

  1. Ensure the instance is started
  2. Dump the database:

    sudo cyberwatch backup save
    
  3. Backup the file created in /var/lib/cyberwatch/backups (or defined by ${CBW_BACKUP_DIR})
  4. Backup configuration folder /etc/cyberwatch

Restore Cyberwatch from a backup

  1. Ensure the instance is started
  2. Restore the database from a dump file. The content of the database will be overwritten:

    sudo cyberwatch backup restore BACKUP_FILE.sql.gz
    

    By default, the command automatically completes with the files available in folder /var/lib/cyberwatch/backups. If no files are provided, the command offers a selection of the backup files available in folder /var/lib/cyberwatch/backups (of defined by ${CBW_BACKUP_DIR})

Disable backups

It is possible to disable backups performed when Cyberwatch restarts by setting the CBW_SKIP_BACKUP=true parameter. For more information, visit the documentation CBW_SKIP_BACKUP.


Back to top