This topic covers Ubersmith's disaster recovery best practices. The best practices are recommended when preparing for an Ubersmith installation or upgrade, and dealing with hardware failures or data corruption.
Ubersmith and its related components are continuously being updated and upgraded, therefore ensuring your platform adheres to our system requirements is recommended.
The most critical aspect of the Ubersmith install is the database. To ensure the integrity of your data:
Perform daily database backups.
- Save a copy of your database to a secure host.
- Configure MySQL replication on a separate host. This can also allow you to offload some
SELECTqueries to the secondary MySQL host, which can improve performance.
- Use a commercial backup solution.
Backing Up the Ubersmith Instance Host
The Ubersmith software is easily replaced, as all data is stored in the database. Backing up the Ubersmith files themselves is not critical. If you have custom scripts or other files added to your Ubersmith install, ensure they are backed up or located in an external source control application such as SVN or git.
Creating a logical backup using
mysqldump can be completed fairly easily. Installation of the MySQL or Percona Server client utilities on your host is required; this package will include
mysqldump. Percona Server (a MySQL fork) is running in Ubersmith's database container and by default is listening on 127.0.0.1:3306. Make a backup using
mysqldump like so:
To restore this logical backup, you can run:
Use Ubersmith's backup container
Creating a physical or 'hot' backup is faster, and has less impact on production database use, but is more complicated to restore. To generate a physical backup with our built-in facility using Percona's
xtrabackup utility (https://www.percona.com/software/mysql-database/percona-xtrabackup), run the following as
This will output the details of the backup as it progresses. To run the backup in the background, run:
Once complete, a tarball of your database files will be placed in
The following commands use an example filename; ensure that you use the filename appropriate for the backup created by the steps above.
Restoring this physical backup is a bit more involved. Copy the tarball into the database container (first ensuring you have enough available disk space to do so):
The command above will place you in a shell within the Ubersmith database container. Run:
To exit the container shell, press CTRL-D or type
exit and hit return.
After restoring the files, restarting the database container is suggested.
Backing Up the Ubersmith Appliance
The RRD files created by Ubersmith's Appliance store the collected bandwidth, power, environmental, and other data stored by your instance, and are vital to the proper processing of bandwidth billing and other monitoring capabilities within Ubersmith.
Backup RRD files
Run the following as
This command will place a tarball of the Appliance's RRD files in
If you need assistance to restore your instance or appliance from a backup, Ubersmith Support will assist you to restore and process our databases.