BACKUP
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
Creates a backup.
DETAILS
This statement creates a backup.
For additional information, see "Fast Backup and Restore with MariaDB Xpand".
EXAMPLES
To AWS S3
Xpand 6.1 can use AWS S3 for backup and restore.
To backup to AWS S3:
BACKUP *.* TO
's3://AWS_BUCKET_NAME/OBJECT_NAME?access_key_id=AWS_ACCESS_KEY_ID&secret_access_key=AWS_SECRET_ACCESS_KEY®ion=AWS_REGION&session_token=AWS_SESSION_TOKEN';
To backup to AWS S3 using Transfer Acceleration:
BACKUP *.* TO
's3://AWS_BUCKET_NAME?endpoint_url=https://AWS_BUCKET_NAME.s3-accelerate.amazonaws.com/OBJECT_NAME&access_key_id=AWS_ACCESS_KEY_ID&secret_access_key=AWS_SECRET_ACCESS_KEY®ion=AWS_REGION&session_token=AWS_SESSION_TOKEN';
To GCP Cloud Storage
Xpand 6.1 can use GCP Cloud Storage for backup and restore.
To backup to GCP Cloud Storage:
BACKUP *.* TO
'gs://GCP_BUCKET_NAME/OBJECT_NAME?credentials=GCP_CREDENTIALS_BASE64';
To SFTP
To backup via SFTP, specify the absolute path of the file, and provide a username and password for authentication:
BACKUP *.* TO
'sftp://USER:PASSWORD@HOST:PORT/ABSOLUTE_PATH';
Password authentication is supported. Public key authentication is not supported.
To FTP
To backup via FTP, specify the relative path of the file from the FTP root directory, and provide a username and password for authentication:
BACKUP *.* TO
'ftp://USER:PASSWORD@HOST:PORT/RELATIVE_PATH';
Passive mode is supported. Active mode is not supported.