Linux Administration

Backup & Migration

2 min read

To perform a backup of the CloudShark software, a few common system administration commands are sufficient.

The general procedure is to stop the CloudShark service, and then save the SQL files and user data to a safe location. This is also the same procedure for performing a system migration. If you are preforming a migration please contact support@cloudshark.io for assistance migrating your license.

For this example, let us use /backups as a USB thumbdrive that is available for storing some backup files. After the backup is complete, the USB thumbdrive is removed from the system and stored in a safe location. This could instead be a remote NFS service or any other storage mechanism.

Specific Commands

  • service cloudshark stop
  • mysqldump -uroot -pqacafe123 cloudshark > /backups/cloudshark.sql
  • mysqldump -uroot -pqacafe123 mysql > /backups/mysql.sql
  • cd /var/www/cloudshark
  • tar -czpf /backups/cloudshark_backup.tar.gz shared/
  • service cloudshark start
  • if you have changed the capture file location in the CloudShark preferences, this directory tree must be preserved as well

Beyond these requirements, any additional unsupported software and user data must be accounted for. This is beyond the scope of this User Guide and is the responsibility of the local administrator.

Restoring from a backup

To restore the CloudShark software from a backup created using the example described above run the following commands:

  • service cloudshark stop
  • mysql -uroot -pqacafe123 mysql < /backups/mysql.sql
  • mysql -uroot -pqacafe123 cloudshark < /backups/cloudshark.sql
  • cd /var/www/cloudshark
  • tar -pxzf /backups/cloudshark_backup.tar.gz
  • chown -R cloudshark:cloudshark /var/www/cloudshark/
  • chown -h root:root /var/www/cloudshark/current
  • service cloudshark start