How to Back Up MySQL Cloud Service Instances?
The beauty of working with Oracle is that it offers everything you need. In backing up and restoring your database on MySQL Cloud Service, for example, you get a MySQL Enterprise Database that you can back up on Oracle Storage Cloud. You can use service containers to serve as repositories for your cloud backups.
How do you do this?
- Get an active subscription of the Oracle Storage Cloud service.
Before everything else, you would need to get a subscription to Oracle Storage Cloud. The good news is that there are several products under its umbrella, such as networking service and storage. You can pay on an “as you go” basis or using the monthly flex pricing. This allows you to save more depending on what you need to do.
- Create a MySQL Cloud Service instance.
Remember that by default, using a MySQL Cloud Service instance would store your backup on Oracle Storage Cloud and the local compute node. You could see that when you go under the Backup and Recovery Configuration section of Service Details page when you create the instance.
Under this section, you would also be able to name the cloud storage container and the username and password you are going to use. And lastly, if you are in fact creating a new container, you would need to check on the tick box next to the “Create Cloud Storage Container” option.
Once you have filled all of these, click on the Create button and wait for the confirmation that the instance has been created successfully.
- Configuring backups.
Run the service and then go to the Service Details page. As the name implies, this is where you show the many details for the backup, including:
- Backup destination: Whether your backups are stored on disk storage or on the cloud.
- Location of the backup: Where you could find the backup volume on your own computer.
- The name of the cloud storage container
- Other details such as the computer shape, MySQL Port, and Connect Descriptor.
This page also has the Node tab and the administration tile. Clicking on the administration tile, you will bring up the backup tab. This tab will allow you to
- start backing up your files now,
- recover a previous backup,
- configure your backups, and
- disable backups. This will also show the default backup schedules.
Clicking on the Configure Backups button, you can change the default backup schedules and the retention period. You might want to remember that Oracle uses best practices in the default backup configuration by telling the system to create a full backup of your database with incremental backups happening in between.
This will set your instance to do the backup automatically at the schedule you have set.
4. Restoring from backup.
From the service details page, you will be able to manually start a backup by clicking Backup Now. You can add a note to the manual backup, allowing you to identify it later on.
If things go wrong and you need to restore a backup volume, all you need to do is choose the relevant volume from the list of available backups.
Once you click Restore, you will be asked to confirm your actions by clicking Yes on the popup screen. You can then add a note to that particular restoration to help identify it. Once you have confirmed, the MySQL Cloud Service instance will then shut down the database before performing the restoration. It will then restart the database instance, as well as automatically creating a new backup of the server state before the restore. You will also see that particular restoration on the restore history list.
Aside from restoring manually created backups, you can also do point in time recovery.
5. Deleting backups.
If there are backups that you no longer need, you can just delete it from the list of available backups. This will help free up storage space. You can only delete manual backups. Scheduled backups are automatically deleted after the retention period has lapsed.