Rclone: Sync files from ftp server to AWS S3 bucket

Introduction
Rclone is a very good command line tool to move files and directories to and from cloud storage.
In this post, I will explain the steps involved in setting up of rclone on mac machine and using it for syncing the files from a free ftp server to AWS S3 bucket

Steps

  1. Install rclone command line
  2. Create source remote(ftp server)
  3. Create destination remote(AWS S3 bucket)
  4. Use rclone command to sync file from source remote(ftp server) to destination remote(AWS S3 bucket). 

Installation of rclone
Use curl command to install rclone on mac machine
curl https://rclone.org/install.sh | sudo bash

Create source remote
Here source is ftp server, so a remote needs to be created with ftp configuration.
Use command
rclone config
Follow the instructions and opt FTP when you get option to select storage. Use 'speedtest.tele2.net' as host, 'anonymous' for user and password can be anything.

Create destination remote
Destination remote is AWS S3 bucket. Follow same process as is done in creating source remote.
Opt S3 as storage.

Confirm the remotes
Command rclone listremotes will list all the remotes created by rclone.

Use rclone to sync files
Suppose source remote name is source-ftp-remote and destination remote name is dest-s3-remote.
rclone source-ftp-remote:/pub/example/ dest-s3-remote:test-ftp-files -v

In above command, /pub/example/ is the path of directory on ftp server which needs to be synced to  test-ftp-files bucket.


Hope you liked this information. Please like this post and provide your valuable feedback.

Comments

Post a Comment

Popular posts from this blog

Diagnostic Interrupt - A way to debug and perform root cause analysis of unresponsive or unreachable AWS EC2 instance

Amazon Elasticsearch Domain Size Calculation