Backblaze configuration with Rclone in WHM
1. Installation
Firstly, You need to install the Rclone on WHM in order to do that you need to run the following installation commands on the terminal and then some Backblaze credentials in configuration.
Fetch and unpack
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip unzip rclone-current-linux-amd64.zip cd rclone-*-linux-amd64
Copy binary file
sudo cp rclone /usr/bin/ sudo chown root:root /usr/bin/rclone sudo chmod 755 /usr/bin/rclone
Install manpage
sudo mkdir -p /usr/local/share/man/man1 sudo cp rclone.1 /usr/local/share/man/man1/ sudo mandb
See this post for the best malware removal techniques
2. Configuration
Run this command in the terminal:
rclone config
To authenticate you will either need your Backblaze Account ID (a short hex number) and Backblaze Master Application Key (a long hex number) OR an Application Key, which is the recommended method.
No remotes found - make a new one n) New remote q) Quit config n/q> n name> remote Type of storage to configure. Choose a number from below, or type in your own value [snip] XX / Backblaze B2 \ "b2" [snip] Storage> b2 Account ID or Application Key ID account> 123456789abc Application Key key> 0123456789abcdef0123456789abcdef0123456789 Endpoint for the service - leave blank normally. endpoint> Remote config -------------------- [remote] account = 123456789abc key = 0123456789abcdef0123456789abcdef0123456789 endpoint = -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
This remote is called remote
and can now be used like this
See all buckets
rclone ls remote:bucket_name
Sync /home/local/directory to the remote bucket, deleting any excess files in the bucket.
rclone sync -i /home/local/directory remote:bucket_name
Copy
the copy option will download the files of the buckets into your destination folder.
Firstly get access to your local directly where you want to download/copy the file of your bucket. Then run this command:
rclone copy you_remote_name:your_bucket_name/file_or_directory_name .
If you have multiple folders in your bucket then you have to give the path of the file through the directories just like you give the path in the command prompt or in the terminal, e.g
rclone copy haremote:backup_repo/backups .
In above example ‘haremote’ is my remote name, ‘backup_repo’ is my bucket name, ‘backups’ is the internal directory name and the period ‘.’ denotes the current directory where you are now.
‘.’ after the bucket path is denoting the current directory.
You can also see the official docs by clicking this link.