twenty20 Logo
twenty20 logo

Deploy database backups from the Open Telekom Cloud as Docker containers

We have developed a simple solution to access the data in an RDS backup locally...

Over the past few months, we have migrated our entire application landscape from a self-operated, geo-redundant Openstack platform to the Open Telekom Cloud. As a Circle Partner, we have been using the Open Telekom Cloud for our own applications as well as for our customers and their applications operated by us on the Open Telekom Cloud.

In addition to the Cloud Container Engine, which offers the efficient provision of infrastructure resources, we use the Relational Database Service (RDS) the Relational Database Service (RDS) very intensively. Almost every application needs a database and RDS makes database management easier than ever to manage databases. Of course, this also applies to database backups.

Database backups of RDS are created in the Open Telekom Cloud using Percona XtraBackup and qpress. The backup is not an SQL dump, which you might expect here, but an exact copy of the binary data of the actual MySQL data. This means that although you receive an exact image of the database, this is transferred to an instance with the same MySQL version and all specific settings. same MySQL version and all specific settings. RDS offers a simple and convenient possibility to restore the backup in a new RDS instance and thus obtain a copy of the database. This can be useful and necessary if you are interested in the database at a certain point in time, for example if for example, if something has been unintentionally deleted in the past but new data has already been added. Then it becomes necessary to extract only a part of the data in the backup and transfer it back into the productive database. database.

To achieve this, it would be possible to copy the database as a new RDS instance in the Open Telekom Cloud, but would involve effort and costs. To make it easier and less expensive to access the data in the RDS backup, we have we have written the "OTC RDS Backup Extractor". This can be used to automatically provide an RDS backup as a Docker container and you have the option of accessing the data locally. Furthermore, the Dockerfile the MySQL version can be specified and other specific settings (e.g. SqlMode, lowercase table names, etc.) to adapt them exactly to the instance from which the backup was taken.

It is very easy to use. First, a new image is created from the Dockerfile. The required packages for Percona XtraBackup and qpress are automatically downloaded from the corresponding repositories:

docker build -t otc-rds-extractor .

A new Docker container is then started with the previously created image, the RDS backup is automatically decompressed and made available as a local MySQL database:

docker run -v $(pwd)/backup.qp:/backup.qp -p 3306:3306 otc-rds-extractor

The database can then be accessed with the original access data under 127.0.0.1:

mysql -u <user> -p -h 127.0.0.1

We provide the "OTC RDS Backup Extractor" free of charge on GitHub. Here is a link to the corresponding repository: https://github.com/TWENTY-20/otc-rds-backup-extractor

back to overview

twenty20 GmbH & Co. KG

Hausinger Straße 6
40764 Langenfeld
+49 (0) 2173 167 00 50

twenty20 Logo