RClone is a command line syncronisation tool like Rsync but for connecting to cloud storage services such as ObjSpace. In this article, we're going to cover backing up and restoring files from a Linux host to Delimiter's ObjSpace.

Installing RClone in 7 Steps

StepActionCentos / RedhatDebian / UbuntuDescription
1Install Unzipyum -y install unzipapt-get -y install unzipUnzip is required to unzip the binary version of RClone
2Change to Home Directorycd ~ 
3Download RClone binarywget http://downloads.rclone.org/rclone-current-linux-amd64.zip 
4Unpack zip file

unzip rclone-current-linux-amd64.zip

 
5Change to RClone directory

cd rclone-v*-linux-amd64/

 
6Copy RClone to /usr/sbin

sudo cp rclone /usr/sbin/

 
7Generate basic configurationcat >> ~/.rclone.conf << EOF
[objspace]
type = s3
access_key_id = YOURACCESSKEY
secret_access_key = YOURSECRETKEY
endpoint = https://obj.space/
region = other-v2-signature
EOF

YOURACCESSKEY and YOURSECRETKEY are shown on the welcome email.

If your Secret Key has an escaped / ie \/ (backslash then forward slash) then remove the backslash so just the forward slash is copied into the config.

Using RClone

ObjSpace uses buckets and subdirectories within the buckets to store files. You can think of buckets like disks, its a way to create a degree of containment of your files. Bucket names are global, so if a customer uses the bucket name 'serverbackup' then no other customer may use that same name for a bucket, so try to be creative in your bucket naming.

Some people use their name as prefix for example: turnerserverbackup or use completely arbitrary names.

You can see what buckets you have in use on your account by running:

rclone lsd objspace:

 

You can use an existing bucket or create a new, for this example I am going to create a bucket called turnerserverbackup:

rclone mkdir objspace:turnerserverbackup

 

You can see the files inside a bucket with:

rclone ls objspace:turnerserverbackup

Copying files to ObjSpace using RClone

Time to copy some files - RClone has two options: Copy which just copies file changes from source to destination, or Sync which not only copies file changes, it deletes files on the destination if they are deleted on the source. The syntax is the same but a different command:

rclone copy /home/myfiles objspace:turnerserverbackup/

or to Sync:

rclone sync /home/myfiles objspace:turnerserverbackup/

 

Be careful when using sync rather than copy, if you are using rclone as a backup tool and accidentally delete a file on the source then the sync will wipe it from the destination too.

Restoring files using RClone

The process is exactly the same as copying to ObjSpace except you swap the source and destination. The same caveat applies about the Copy and Sync command:

rclone copy objspace:turnerserverbackup/myfiles /home/

or to Sync:

rclone sync objspace:turnerserverbackup/myfiles /home/

Summary

Before using RClone on any critical files, spend some time to get used to the commands. Its very easy to overwrite or delete your files, RClone is designed to be as automated as possible so it wont prompt you before deletion.

If you have any issues using ObjSpace then please open a support ticket.