Skip to Content

Rsync With AWS S3 | 6 Things To Know

Sharing is caring!

We strive to provide you with authoritative, trustworthy, and expert advice. In doing so, the staff at performs extensive research, editing, and fact checking to every post on this webiste. If you feel that this article can improve, please feel free to reach us at

Before continuing this article, I wanted to let you know that I have a Youtube Channel where I showcase all sorts of video content related to Tech. Subscribing would mean a lot to me, and I very much appreicate all the support!

When you need to quickly backup your Amazon Web Services (AWS) Amazon Simple Storage Service (S3), the rsync utility provides you a better option than using file transfer protocol (FTP).

The rsync option works much quicker and you can use it fee-free to back up to your local drive.

AWS Rsync S3

You can use rsync, a Linux/UNIX-based command-line utility to copy an entire file system and sync it with the cloud files.

This lets you have a copy of your AWS S3 files and folders on your local drive and keeps both copies in sync with one another.

Because it uses a command-line interface, it sometimes scares off new users, but it provides one of the most useful utilities for those who need to sync or backup large amounts of data.

It works with any application of storage that AWS S3 offers, so you can use it to manage your data lake or backup your website and blog files, or both.

Rsync Upload AWS

Since your files reside on both servers and rsync keeps them synced, you can update a file on your local drive, and it will update on the AWS S3 space.

You can also create your files on your local drive, then upload them to your server space.

Beware of copycat software.

The original GNU-created software doesn’t limit bucket sizes, but the knockoff software, S3rsync and boto rsync do limit buckets, typically to 10GB chunks.

Conversely, information technologists haven’t had trouble with backups or uploads of up to 60GB with the original rsync.

Rsync only transfers files that changed, rather than backing up from scratch each time.

In fact, it goes one further than that and quickly examines file chunks.

Only the updated chunk gets upload or synced.

Backup Rsync AWS S3

Some users found that they could not directly backup their AWS S3 space using rsync because it required a helper app. 

The backup required the use of aws-cli, but once it was installed and set up, things went ideally.

To use this with rsync and AWS S3, you need the following To communicate with your S3:

  • IAM user credentials with read-write access to the S3 bucket,
  • A bash client such as aws-cli or boto library (Python).

Rsync to AWS Glacier

Amazon offers a bevy of storage classes for data archives and long-term backup. One of these is S3 Glacier. It falls on the very low-cost end of the Amazon S3 storage classes.

You can scale the storage, so you eliminate capacity concerns. Don’t get bogged down in this.

Amazon has a ton of storage classes, including RRS, for frequently accessed data, to Glacier Deep Archive for rarely accessed information that takes up to 12 hours to retrieve.

Other classes include S3 Standard, S3 Standard-IA, S3 Intelligent-Tiering, and S3 One Zone-IA.

AWS S3 Copy Rsync

Although many individuals in IT adore rsync for its sync capabilities, you can use it to simply copy files.

It provides a speedier method.

To make a recursive copy, use the command:

aws s3 cp –recursive. s3://mybucket/

You will end up copying the local files in your current directory into the S3 bucket.

AWS Rsync Permission Denied

When you receive a permission denied error, you will also get an error message with a code that explains the problem.

SSH issues top the list of problems, followed by improper syntax.

It happens.

Despite your most careful setup on the AWS end and rsync, you find that you receive an error message.

The message comes back as “permission denied.”

Code 255 unexpectedly closes your connection, and indicates that rsync lacks permission to operate over an SSH connection.

A common public key error indicates improper syntax in the rsync switch.

Check if the syntax includes the precise server for which you have access permissions.

Also, check to make sure that you have read and write permissions.

You cannot run a backup if you have read-only permissions.

Along those same lines, you cannot use commands unavailable to your user level.

For example, sudo remains outside of your reach if you weren’t designated as a superuser.

You also commonly receive this error message if you accidentally overwrote your SSH files.

You will need to reset the SSH configuration.

When you reset the files, in the sshd_config file, PubkeyAuthentication to yes and set PermitRootLogin to yes to make it simpler to conduct file exchanges.