Difference between revisions of "Rclone"

From SME Server
Jump to navigationJump to search
Line 91: Line 91:
 
<code>
 
<code>
 
!/bin/sh
 
!/bin/sh
 +
 
signal-event pre-backup
 
signal-event pre-backup
 +
 
cd /
 
cd /
 +
 
rclone mkdir smeserver-dropbox:backup
 
rclone mkdir smeserver-dropbox:backup
 +
 
rclone mkdir smeserver-dropbox:backup/smeserver
 
rclone mkdir smeserver-dropbox:backup/smeserver
 +
 
rclone mkdir smeserver-dropbox:backup/smeserver/etc/e-smith/templates-user-custom
 
rclone mkdir smeserver-dropbox:backup/smeserver/etc/e-smith/templates-user-custom
 +
 
rclone mkdir smeserver-dropbox:backup/smeserver/etc/e-smith/templates-custom
 
rclone mkdir smeserver-dropbox:backup/smeserver/etc/e-smith/templates-custom
 +
 
rclone mkdir smeserver-dropbox:backup/smeserver/home
 
rclone mkdir smeserver-dropbox:backup/smeserver/home
 +
 
rclone mkdir smeserver-dropbox:backup/smeserver/ssh
 
rclone mkdir smeserver-dropbox:backup/smeserver/ssh
 +
 
rclone mkdir smeserver-dropbox:backup/smeserver/root
 
rclone mkdir smeserver-dropbox:backup/smeserver/root
 +
 
rclone copy -v  / smeserver-dropbox:backup/smeserver --files-from backup-files-list-rclone
 
rclone copy -v  / smeserver-dropbox:backup/smeserver --files-from backup-files-list-rclone
 +
 
rclone copy -v  "etc/e-smith/templates-custom/" "smeserver-dropbox:backup/smeserver/etc/e-smith/templates-custom/"
 
rclone copy -v  "etc/e-smith/templates-custom/" "smeserver-dropbox:backup/smeserver/etc/e-smith/templates-custom/"
 +
 
rclone copy -v  "etc/e-smith/templates-user-custom/" "smeserver-dropbox:backup/smeserver/etc/e-smith/templates-user-custom/"
 
rclone copy -v  "etc/e-smith/templates-user-custom/" "smeserver-dropbox:backup/smeserver/etc/e-smith/templates-user-custom/"
 +
 
rclone copy -v  etc/ssh smeserver-dropbox:backup/smeserver/ssh
 
rclone copy -v  etc/ssh smeserver-dropbox:backup/smeserver/ssh
 +
 
rclone copy -v  root smeserver-dropbox:backup/smeserver/root
 
rclone copy -v  root smeserver-dropbox:backup/smeserver/root
 +
 
rclone copy -v  home/e-smith/ smeserver-dropbox:backup/smeserver/home/ --exclude "tmp/**"
 
rclone copy -v  home/e-smith/ smeserver-dropbox:backup/smeserver/home/ --exclude "tmp/**"
 +
 
</code>
 
</code>
 
 
  
 
=== Uninstall ===
 
=== Uninstall ===

Revision as of 15:05, 11 March 2018




rclone
NeedImage.svg
rclone logo
Maintainerbrianr
Urlhttps://wiki.contribs.org
LicenceGPL
Category

cli

Tags clicentosSMEinstall


Warning.png Warning:
Only for testing purpose, please report in bugzilla


Maintainer

Brian Read

Version

smeserver-rclone
The latest version of smeserver-rclone is available in the SME repository, click on the version number(s) for more information.

Not yet built into an rpm. Requires command level knowledge to install,

Description

Rclone is a program written in go to allow local files to be saved to one of many cloud servers. It tries to emulate rsync.

Current cloud providers supported are:

   Amazon Drive
   Amazon S3
   Backblaze B2
   Box
   Ceph
   DigitalOcean Spaces
   Dreamhost
   Dropbox
   FTP
   Google Cloud Storage
   Google Drive
   HTTP
   Hubic
   Memset Memstore
   Microsoft Azure Blob Storage
   Microsoft OneDrive
   Minio
   Nextloud
   OVH
   Openstack Swift
   Oracle Cloud Storage
   Ownloud
   pCloud
   put.io
   QingStor
   Rackspace Cloud Files
   SFTP
   Wasabi
   WebDAV
   Yandex Disk
   The local filesystem

I have only tested it against Dropbox.

Installation

Rclone can be installed as follows: (https://rclone.org/install/)

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone

Then you can the configuration process:

rclone config
and follow the instructions for a headless server

For Dropbox I had to run rclone on a desktop with a browser, giving permission for rclone to be allowed to connect to Dropbox and then copy and paste a key string across to the smeserver.

Useage

Here is the shell script that I developed and tested to see if it would work:

!/bin/sh

signal-event pre-backup

cd /

rclone mkdir smeserver-dropbox:backup

rclone mkdir smeserver-dropbox:backup/smeserver

rclone mkdir smeserver-dropbox:backup/smeserver/etc/e-smith/templates-user-custom

rclone mkdir smeserver-dropbox:backup/smeserver/etc/e-smith/templates-custom

rclone mkdir smeserver-dropbox:backup/smeserver/home

rclone mkdir smeserver-dropbox:backup/smeserver/ssh

rclone mkdir smeserver-dropbox:backup/smeserver/root

rclone copy -v / smeserver-dropbox:backup/smeserver --files-from backup-files-list-rclone

rclone copy -v "etc/e-smith/templates-custom/" "smeserver-dropbox:backup/smeserver/etc/e-smith/templates-custom/"

rclone copy -v "etc/e-smith/templates-user-custom/" "smeserver-dropbox:backup/smeserver/etc/e-smith/templates-user-custom/"

rclone copy -v etc/ssh smeserver-dropbox:backup/smeserver/ssh

rclone copy -v root smeserver-dropbox:backup/smeserver/root

rclone copy -v home/e-smith/ smeserver-dropbox:backup/smeserver/home/ --exclude "tmp/**"

Uninstall

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-rclone component or use this link


Below is an overview of the current issues for this contrib:

No open bugs found.

Changelog

Only released version in smecontrib are listed here.