--- Title: Export data from a database alwaysopen: false categories: - docs - operate - rs description: You can export data to import it into a new database or to make a backup. This article shows how to do so. linktitle: Export data weight: 20 url: '/operate/rs/7.22/databases/import-export/export-data/' --- You can export the data from a specific database at any time. The following destinations are supported: - FTP server - SFTP server - Amazon AWS S3 - Local mount point - Azure Blob Storage - Google Cloud Storage If you export a database configured for database clustering, export files are created for each shard. ## Storage space requirements Before exporting data, verify that you have enough space available in the storage destination and on the local storage associated with the node hosting the database. Export is a two-step process: a temporary copy of the data is saved to the local storage of the node and then copied to the storage destination. (The temporary file is removed after the copy operation.) Export fails when there isn't enough space for either step. ## Export database data To export data from a database using the Cluster Manager UI: 1. On the **Databases** screen, select the database from the list, then select **Configuration**. 1. Click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="Toggle actions button" width="22px" class="inline" >}} to open a list of additional actions. 1. Select **Export**. 1. Select the tab that corresponds to your storage location type and enter the location details. See [Supported storage locations](#supported-storage-locations) for more information about each storage location type. 1. Select **Export**. ## Supported storage locations {#supported-storage-locations} Data can be exported to a local mount point, transferred to [a URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) using FTP/SFTP, or stored on cloud provider storage. When saved to a local mount point or a cloud provider, export locations need to be available to [the group and user]({{< relref "/operate/rs/7.22/installing-upgrading/install/customize-user-and-group.md" >}}) running Redis Enterprise Software, `redislabs:redislabs` by default. Redis Enterprise Software needs the ability to view permissions and update objects in the storage location. Implementation details vary according to the provider and your configuration. To learn more, consult the provider's documentation. The following sections provide general guidelines. Because provider features change frequently, use your provider's documentation for the latest info. ### FTP server Before exporting data to an FTP server, verify that: - Your Redis Enterprise cluster can connect and authenticate to the FTP server. - The user specified in the FTP server location has permission to read and write files to the server. To export data to an FTP server, set **Path** using the following syntax: ```sh [protocol]://[username]:[password]@[host]:[port]/[path]/ ``` Where: - *protocol*: the server's protocol, can be either `ftp` or `ftps`. - *username*: your username, if needed. - *password*: your password, if needed. - *hostname*: the hostname or IP address of the server. - *port*: the port number of the server, if needed. - *path*: the export destination path, if needed. Example: `ftp://username:password@10.1.1.1/home/exports/` ### Local mount point Before exporting data to a local mount point, verify that: - The node can connect to the server hosting the mount point. - The `redislabs:redislabs` user has permission to read and write files to the local mount point and to the destination server. - The export location has enough disk space for your exported data. To export to a local mount point: 1. On each node in the cluster, create the mount point: 1. Connect to the node's terminal. 1. Mount the remote storage to a local mount point. For example: ```sh sudo mount -t nfs 192.168.10.204:/DataVolume/Public /mnt/Public ``` 1. In the path for the export location, enter the mount point. For example: `/mnt/Public` ### SFTP server Before exporting data to an SFTP server, make sure that: - Your Redis Enterprise cluster can connect and authenticate to the SFTP server. - The user specified in the SFTP server location has permission to read and write files to the server. - The SSH private keys are specified correctly. You can use the key generated by the cluster or specify a custom key. To use the cluster auto generated key: 1. Go to **Cluster > Security > Certificates**. 1. Expand **Cluster SSH Public Key**. 1. Download or copy the cluster SSH public key to the appropriate location on the SFTP server. Use the server documentation to determine the appropriate location for the SSH public key. To export data to an SFTP server, enter the SFTP server location in the format: ```sh sftp://[username]:[password]@[host]:[port]/[path]/ ``` Where: - *username*: your username, if needed. - *password*: your password, if needed. - *hostname*: the hostname or IP address of the server. - *port*: the port number of the server, if needed. - *path*: the export destination path, if needed. For example: `sftp://username:password@10.1.1.1/home/exports/` ### AWS Simple Storage Service To export data to an [Amazon Web Services](https://aws.amazon.com/) (AWS) Simple Storage Service (S3) bucket: 1. Sign in to the [AWS console](https://console.aws.amazon.com/). 1. [Create an S3 bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html) if you do not already have one. 1. [Create an IAM User](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_console) with permission to add objects to the bucket. 1. [Create an access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) for that user if you do not already have one. 1. In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: - Select **AWS S3**. - In the **Path** field, enter the path of your bucket. - In the **Access key ID** field, enter the access key ID. - In the **Secret access key** field, enter the secret access key. You can also connect to a storage service that uses the S3 protocol but is not hosted by Amazon AWS. The storage service must have a valid SSL certificate. To connect to an S3-compatible storage location: 1. Configure the S3 URL with [`rladmin cluster config`]({{}}): ```sh rladmin cluster config s3_url ``` Replace `` with the hostname or IP address of the S3-compatible storage location. 1. Configure the S3 CA certificate: ```sh rladmin cluster config s3_ca_cert ``` Replace `` with the location of the S3 CA certificate `ca.pem`. ### Google Cloud Storage To export to a [Google Cloud](https://developers.google.com/console/) storage bucket: 1. Sign in to the Google Cloud console. 1. [Create a JSON service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating) if you do not already have one. 1. [Create a bucket](https://cloud.google.com/storage/docs/creating-buckets#create_a_new_bucket) if you do not already have one. 1. [Add a principal](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-add) to your bucket: - In the **New principals** field, add the `client_email` from the service account key. - Select "Storage Legacy Bucket Writer" from the **Role** list. 1. In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: - Select **Google Cloud Storage**. - In the **Path** field, enter the path of your bucket. - In the **Client ID** field, enter the `client_id` from the service account key. - In the **Client Email** field, enter the `client_email` from the service account key. - In the **Private Key ID** field, enter the `private_key_id` from the service account key. - In the **Private key** field, enter the `private_key` from the service account key. Replace `\n` with new lines. ### Azure Blob Storage To export to Microsoft Azure Blob Storage, sign in to the Azure portal and then: 1. [Create an Azure Storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create) if you do not already have one. 1. [Create a container](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal#create-a-container) if you do not already have one. 1. [Manage storage account access keys](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage) to find the storage account name and account keys. 1. In the Redis Enterprise Software Cluster Manager UI, when you enter the export location details: - Select **Azure Blob Storage**. - In the **Path** field, enter the path of your bucket. - In the **Account name** field, enter your storage account name. - In the **Account key** field, enter the storage account key. To learn more, see [Authorizing access to data in Azure Storage](https://docs.microsoft.com/en-us/azure/storage/common/storage-auth).