Export AWS RDS mysql Database to S3 Bucket using xtrabackup or any other method

I have an AWS RDS MySQL Database. The size of the Database is around of 1.5 GB.
We are using MySQL 5.7.32.

We tried with SQL dump but in dump data is missing in Dump.

We found out that we can use xtrabackup. We are using xtrabackup version 2.4.21 based on MySQL server 5.7.32 Linux (x86_64).

We used below command

sudo ./xtrabackup --backup --user=user --host=project.eu-central-1.rds.amazonaws.com --password=password --databases=database--port=3306

Error was like

xtrabackup: recognized server arguments:
xtrabackup: recognized client arguments: --backup=1 --user=user --host=project.eu-central-1.rds.amazonaws.com --password=* --databases=database --port=3306
210811 05:31:47  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup;host=project.eu-central-1.rds.amazonaws.com;port=3306' as 'user'  (using password: YES).
210811 05:31:47  version_check Connected to MySQL server
210811 05:31:47  version_check Executing a version check against the server...
210811 05:31:48  version_check Done.
210811 05:31:48 Connecting to MySQL server host: project.eu-central-1.rds.amazonaws.com, user: user, password: set, port: 3306, socket: not set
Using server version 5.7.12-log
./xtrabackup version 2.4.21 based on MySQL server 5.7.32 Linux (x86_64) (revision id: 5988af5)
xtrabackup: uses posix_fadvise().
xtrabackup: Can't change dir to '/rdsdbdata/db/' (Errcode: 2 - No such file or directory)
xtrabackup: cannot my_setwd /rdsdbdata/db/
2 Likes

Hi @hirennamera .

Xtrabackup require physical access to the files it’s backing up, meaning you cannot use it to backup RDS instances.

I suggest you take a look at :
mysqldump - MySQL :: MySQL 5.7 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program
mydumper - GitHub - maxbube/mydumper: Official mydumper project

those two tools will take logical backups and can be used to backup remote hosts.

2 Likes