====== Setting up rclone ====== [[https://rclone.org/|rclone]] is an opensource tool for syncing to various forms of cloud storage. The 32bit ARM binary works on the reMarkable, and with just a little bit of effort it is relatively easy to sync the device with your Google drive from the [[tech:ssh|ssh shell]]. ===== Installation ===== ==== Install using opkg ==== As of December 2020, rclone can now be installed using the [[https://github.com/toltec-dev/toltec|Opkg (Entware) package manager]]. Simply SSH into your device and run: opkg install rclone ==== Manual installation ==== * Download the binaries * Download the latest 32bit ARM binaries from https://downloads.rclone.org/rclone-current-linux-arm.zip * Unpack the binaries (xenial)kimbotha@localhost:~/Downloads/src$ unzip ../rclone-current-linux-arm.zip Archive: ../rclone-current-linux-arm.zip creating: rclone-v1.38-linux-arm/ inflating: rclone-v1.38-linux-arm/README.html inflating: rclone-v1.38-linux-arm/rclone inflating: rclone-v1.38-linux-arm/rclone.1 inflating: rclone-v1.38-linux-arm/README.txt * Copy the rclone binary to the reMarkable (xenial)kimbotha@localhost:~/Downloads/src$ cd rclone-v1.38-linux-arm/ (xenial)kimbotha@localhost:~/Downloads/src/rclone-v1.38-linux-arm$ scp rclone root@10.11.99.1:/usr/bin/ rclone 100% 13MB 4.4MB/s 00:03 ===== Connecting to a cloud provider ===== * SSH to the reMarkable with a port forward of 53682 (xenial)kimbotha@localhost:~/Downloads/src/rclone-v1.38-linux-arm$ ssh -L 53682:localhost:53682 root@10.11.99.1 reMarkable ╺━┓┏━╸┏━┓┏━┓ ┏━╸┏━┓┏━┓╻ ╻╻╺┳╸┏━┓┏━┓ ┏━┛┣╸ ┣┳┛┃ ┃ ┃╺┓┣┳┛┣━┫┃┏┛┃ ┃ ┣━┫┗━┓ ┗━╸┗━╸╹┗╸┗━┛ ┗━┛╹┗╸╹ ╹┗┛ ╹ ╹ ╹ ╹┗━┛ remarkable: ~/ * Make the rclone binary executable remarkable: ~/ chmod +x /usr/bin/rclone * Run the rclone config to set up the config for your cloud storage remarkable: ~/ rclone config 2017/11/12 21:37:18 NOTICE: Config file "/home/root/.config/rclone/rclone.conf" not found - using defaults No remotes found - make a new one n) New remote s) Set configuration password q) Quit config n/s/q> n name> cloud Type of storage to configure. Choose a number from below, or type in your own value 1 / Amazon Drive \ "amazon cloud drive" 2 / Amazon S3 (also Dreamhost, Ceph, Minio) \ "s3" 3 / Backblaze B2 \ "b2" 4 / Box \ "box" 5 / Dropbox \ "dropbox" 6 / Encrypt/Decrypt a remote \ "crypt" 7 / FTP Connection \ "ftp" 8 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage" 9 / Google Drive \ "drive" 10 / Hubic \ "hubic" 11 / Local Disk \ "local" 12 / Microsoft Azure Blob Storage \ "azureblob" 13 / Microsoft OneDrive \ "onedrive" 14 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift" 15 / QingClound Object Storage \ "qingstor" 16 / SSH/SFTP Connection \ "sftp" 17 / Yandex Disk \ "yandex" 18 / http Connection \ "http" Storage> 9 Google Application Client Id - leave blank normally. client_id> Google Application Client Secret - leave blank normally. client_secret> Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine or Y didn't work y) Yes n) No y/n> Y If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth Log in and authorize rclone for access Waiting for code... * Connect to the URL on your main machine (which should be available because of the port forward * Authorize the connection * On your reMarkable the rclone config process should continue Got code Configure this as a team drive? y) Yes n) No y/n> y Fetching team drive list... No team drives found in your account-------------------- [cloud] client_id = client_secret = token = {"access_token":"XX.....XX","token_type":"Bearer","refresh_token":"1/XX.....XX","expiry":"2017-11-12T22:40:50.400973087Z"} team_drive = -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y Current remotes: Name Type ==== ==== cloud drive e) Edit existing remote n) New remote d) Delete remote r) Rename remote c) Copy remote s) Set configuration password q) Quit config e/n/d/r/c/s/q> q * You should now be able to use rclone with this config and enable copying, syncing, downloading etc. remarkable: ~/ rclone help Rclone is a command line program to sync files and directories to and from various cloud storage systems and using file transfer services, such as: ... * For example, if you want to synchronize the content of folder "test" of your google drive with folder "/home/root/mydrive" of your remarkable, you can use the following command: remarkable: ~/ rclone sync cloud:test /home/root/mydrive