Onedrive su Debian 10 con rclone

Onedrive su Debian 10 con rcloneOnedrive su Debian 10 con rclone

Guida su come connettere il proprio account OneDrive, da linea di comando, utilizzando rclone.

Installazione di rclone:

$ sudo apt install rclone fuse

Configurazione:

$ rclone config

output:

edmond@edmondbox:~$ rclone config
2020/05/25 18:25:55 NOTICE: Config file "/home/edmond/.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> myonedrive
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / A stackable unification remote, which can appear to merge the contents of several remotes
\ "union"
2 / Alias for a existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Dropbox
\ "dropbox"
9 / Encrypt/Decrypt a remote
\ "crypt"
10 / FTP Connection
\ "ftp"
11 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
12 / Google Drive
\ "drive"
13 / Hubic
\ "hubic"
14 / JottaCloud
\ "jottacloud"
15 / Local Disk
\ "local"
16 / Microsoft Azure Blob Storage
\ "azureblob"
17 / Microsoft OneDrive
\ "onedrive"
18 / OpenDrive
\ "opendrive"
19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
20 / Pcloud
\ "pcloud"
21 / SSH/SFTP Connection
\ "sftp"
22 / Webdav
\ "webdav"
23 / Yandex Disk
\ "yandex"
24 / http Connection
\ "http"
Storage> 17
** See help for onedrive backend at: https://rclone.org/onedrive/ **

Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
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...
Got code

Autorizzare rclone come app sicura:

Onedrive su Debian 10 con rclone

Choose a number from below, or type in an existing value
1 / OneDrive Personal or Business
\ "onedrive"
2 / Root Sharepoint site
\ "sharepoint"
3 / Type in driveID
\ "driveid"
4 / Type in SiteID
\ "siteid"
5 / Search a Sharepoint site
\ "search"
Your choice> 1
Found 1 drives, please select the one you want to use:
0: (personal) id=72593143d3aac403
Chose drive to use:> 0
Found drive 'root' of type 'personal', URL: https://onedrive.live.com/?cid=72593143d3aac403
Is that okay?
y) Yes
n) No
y/n> y
--------------------
[myonedrive]
token = {"access_token":"EwBoA8l6BAAUO9chh8cJscQLmU+LSWpbnr0vmwwAAcTsM8GrYTxDxI5BKZdaB","expiry":"2020-05-25T19:26:56.661526715+02:00"}
drive_id = 72593143d3aac403
drive_type = personal
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:

Name Type
==== ====
myonedrive onedrive

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
edmond@edmondbox:~$

creazione punto di mount e montaggio utilizzando fuse:

$ mkdir ~/onedrive
$ rclone mount --daemon --vfs-cache-mode writes myonedrive: ~/onedrive

al posto di writes si può utilizzare full, per scaricare tutto in locale. La locazione del file di configurazione si trova col comando:

$ rclone config file

Come alternativa esiste il pacchetto deb di OneDrive che si trova in Debian Sid, ma che io non ho testato.

Onedrive su Debian 10 con rclone

enjoy 😉

Post simili (quasi):

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *