Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial will show you how to use rclone to back up your data to Amazon S3. Please note that you will need a valid Amazon / AWS account for this to work. In addition, AWS will charge you based on the amount of storage you use.


Table of Contents


Install Rclone on instance

rclone

Image Removed

NOTE: Please make sure you have logged in into your RAC instance. Once logged in follow the steps:

STEP - I :  Install Rclone on instance

Rclone is a command line program to sync files and directories to and from cloud storage.

Quickstart Installation

  • Download the relevant binary.

  • Extract the rclone or rclone .exe binary from the archive.

  • Run rclone config to set up.

Installation by using a script

Install rclone on Linux/macOS/BSD systems:

cImage Removed

STEP - II :  Create a directory and mount the attached storage.

Create a directory

$ sudo mkdir  directory path

Example: $ sudo mkdir /mnt/rclone_test

Mount a volume

$ sudo mount volume  directory path

Example: $ sudo mount /dev/sdc   /mnt/rclone_test

Code Block
curl https://rclone.org/install.sh | sudo bash

Configure rclone

...

After installing Rclone:

  1. Type $ rclone config 

  2. Type n for a New remote

  3. Give a name to your remote (AWS in this example)

  4. Select the type of storage to configure

...

           before closing the rclone.


STEP- IV : Creating  a

Create a S3 bucket using Rclone

...

Run the following command:

Code Block
$ rclone mkdir

...

Example: $ rclone mkdir  AWS:rclonebucket3

 <remote name>:<bucket name>


Note

AWS S3 bucket names must be globally unique. It helps to create a bucket name using a unique name. For example, instead of calling a bucket "mysql_backups", call it "jdoe777_mysql_backups".


Once the Once remote is configured and the bucket is created you can use below commands to list the remotes and buckets:


Code Block

...

$ rclone listremotes

...


$ rclone lsd

...

 <remote name>:

...

Synching/Copying using

...

Rclone Sync - it makes source and destination identical, modifying destination only.

rclone


Run the Run below command to sync your volume data to your AWS bucket:

Code Block
$ sudo rclone sync /path/

...

to/local/

...

Example: $ sudo rclone sync /mnt/rclone_test/ AWS:rclonebucket

NOTE: Switch the source and destinations values if you want to copy data from AWS bucket to RAC volume.

data  <remote name>:<bucket name>


For example:

Code Block
$ sudo rclone sync /var/lib/mysql  aws:mysql_backups

rclone Copy 

To copy Rclone Copy- Copy files from source to destination , and skipping files that have already been copied.Run below command to sync your volume to AWS bucket::

Code Block
$

...

 rclone copy

...

 /path/

...

to/local/

...

Example: $ sudo rclone copy /mnt/rclone_test/ AWS:rclonebucket

NOTE: Sync or copy volume to Amazon S3 bucket (requires a write access on bucket).

This tutorial assumes that you have the following already in place:

...

An AWS account.

...

AWSAccess keys.

A RAC Instance with attached volume.

...

data <remote name>:<bucket name>