How to Backup DigitalOcean Managed Database⚓
This article will discuss how to backup a DigitalOcean Managed Database to Backblaze B2 using Snapshooter.1 Snapshooter has documentation on how to configure B2 to accept backups from Snapshooter that can be found here.
This guide is mostly a copy/paste from the Snapshooter MySQL backup documentation. This documentation is geared towards backing up a local database, however, it's easy enough to replace the pieces of information with the host and user information from the Managed Database on DigitalOcean. This will be presented at the end of this article.
- From the MySQL area of the dashboard press Setup New MySQL Backup
- Provide the servers SSH details
- Friendly name for the backups
- SSH Host (IP or hostname)
- The SSH user (if you would like to setup a new user follow this guide)
- SSH port (Usually 22)
- SnapShooter will generate a 4096 bit key pair
- Install the key pair SnapShooter provides a command you can run to perform the installation. 8e64gwP.png
- Test setup
- If everything worked as expected you will be asked for MySQL details. Otherwise, you will be displayed the output from the SSH connection to help you diagnose any SSH issues.
- Provide Mysql Authentication details
SnapShooter will check the connection and return a helpful error if something needs fixing.
- If the database you wish to back up is not appearing, make sure the supplied MySQL user has the correct permissions to view and use the database and then refresh the page.
- Choose Storage
- If you don't have an storage provider set up, you will be prompted to setup a new provider. here
- Select the storage provider you wish to use to store backups.
- If you only have one storage provider set up, that one will be chosen by default.
- Choose Schedule
- Depending on which plan you are on, the options might be different.
- Free users can only select daily backups.
- Choose how often you want backups to run.
- Choose timezone and time offset.
- Retention Policy
- Choose the number of backups you wish to store (only an option if you have scheduled more frequently than daily)
- Choose number of daily snapshots you wish to retain.
- Choose number of weekly snapshots you wish to retain.
This guide is mostly for learning purposes. DigitalOcean includes regular backups, as well as point in time backups of Managed Databases as part of the service. It's good to always have a regular backup stored in another location, but in this case, it's likely redundant. ↩