Skip to content

Rclone

Installation

Download the linux version of rclone and copy the binary to a remote server with lots of bandwidth. /home/u159938358/domains/shepherdsglobal.org/tools/

Setting up OneDrive access

Use the OneDrive account sgcwebsite@shepherdsglobal.org for this application, and share the "01 Audio" folder with edit access to that account. If any other folders need to be accessible to this setup, just share them (with appropriate permissions as needed) with sgcwebsite@shepherdsglobal.org.

Do the OneDrive setup (rclone config) on a local machine so you can log in to the proper MS account easily. Then just copy the rclone.conf file to the remote machine, after encrypting it with a password.

(To revoke rclone's access to the OneDrive account, go to https://myapps.microsoft.com, make sure you're signed into the correct account, find "rclone" in the list and remove it.)

Usage

Running rclone lsd onedrive: probably won't show anything because shared folders don't show up by default. But you can still copy files to them. To show all folders in "01 Audio" do rclone lsd onedrive:"01 Audio"

To copy files from one to the other, do rclone copy -P and then [SOURCE] [DESTINATION], for example:

rclone copy -Pv onedrive:"01 Audio/Spanish/ML" b2:sgc-app-static-files/production/uploads/audio/spanish/ML --include=/*.mp3

Download ZIP from MV OneDrive to server

To download a ZIP file from Megavoice's shared OneDrive folder, open Dev tools to the Network tab, then click the download button in the OneDrive web UI. Right click on the resulting request and copy it as cURL and then paste that into the terminal on the server to download it to the server. (add --output file.zip to the end so it saves to a file).

Run unzip -O UTF-8 <filename.zip> on the zip file (you need the -O UTF-8 bit to avoid mangling filenames with special characters like accents), then use rclone to upload to the SGC OneDrive:

rclone copy -Pv 027498_sgc_christian\ beliefs_english_master/ onedrive:"01 Audio/English/CB"