Using Amazon S3 File Gateway to transfer backup files - AWS Prescriptive Guidance

Using Amazon S3 File Gateway to transfer backup files

Amazon S3 File Gateway connects your on-premises environment to Amazon Simple Storage Service (Amazon S3) through a file interface so that you can store and retrieve Amazon S3 objects by using industry-standard file protocols, such as Network File System (NFS) and Server Message Block (SMB). It is designed to be a cost-effective, scalable solution for storing data in the cloud. Because you can use it to store database backup files, this service can help you migrate large, on-premises databases to the AWS Cloud. For example, you could use Amazon S3 File Gateway and your preferred database backup tool to back up the large MySQL or MariaDB database directly to an Amazon S3 bucket. You can then mount the S3 bucket to the target instance and restore the backup.

The following diagram shows the high-level steps involved when using Amazon S3 File Gateway to transfer the backup file for an on-premises database to an S3 bucket in the AWS Cloud.

Diagram showing the transfer of a database backup file to the cloud by using Amazon S3 File Gateway.

The following are the steps for using Amazon S3 File Gateway to transfer a database backup file from an on-premises data center to an S3 bucket in the AWS Cloud:

  1. Connect the on-premises data center to the AWS Cloud by using a service such as AWS Direct Connect or AWS Site-to-Site VPN or by using a public internet connection.

  2. Create an S3 File Gateway. For instructions, see Creating your gateway.

  3. Create an NFS or SMB file share that is hosted by the S3 File Gateway. For instructions, see Create a file share.

  4. Mount the NFS or SMB file share on the on-premises server that hosts your MySQL or MariaDB database. For instructions, see Mount and use your file share.

  5. Back up the on-premises MySQL or MariaDB database to the directory where the NFS file share is mounted. You can use any of the backup tools discussed in this guide.

  6. Restore the database backup on the target database instance by using any of the approaches discussed in this guide.

Advantages

  • By producing database backups directly in the S3 bucket and restoring the backup on the target DB instance directly from the same S3 bucket, you can significantly accelerate the end-to-end migration process.

  • Database backup files are stored durably in Amazon S3, and you choose the lifecycle management policy and S3 storage class.

Limitations

The following are limitations when using Amazon S3 File Gateway file shares:

  • The maximum number of file shares per gateway is 50.

  • To prevent read and write conflicts when multiple file shares use the same S3 bucket, you must configure each file share to use a unique prefix name.

  • The maximum size of an individual file is 5 TB, which is the maximum size of any individual object in Amazon S3.

  • The maximum path length is 1024 characters.

  • Windows ACLs are supported only on file shares that are enabled for Active Directory when you use Windows SMB clients to access the file shares.

  • Amazon S3 File Gateway supports a maximum of 10 ACL entries for each file and directory.

  • The root ACL settings of SMB file shares are only on the gateway. These settings are persistent across gateway updates and restarts.

    Note

    If you configure the ACLs on the root instead of the parent folder under the root, the ACL permissions aren't persistent in Amazon S3.

Best practices

For more information about the best practices for Amazon S3 File Gateway, see Best practices in the S3 File Gateway documentation.