Total Pageviews

Showing posts with label rclone. Show all posts
Showing posts with label rclone. Show all posts

Sunday, 29 December 2024

Automount Rclone on Linux


Step-by-Step Guide to automount rclone on linux

Automatically Mounting rclone Remote Directory on Debian 11 (pikpak)

To automatically mount the remote directory using rclone on system restart in Debian 11, you can create a systemd service unit. Here’s how you can do it:

Create a systemd service unit file: Open a terminal and create a new service unit file using your favorite text editor. For example:

sudo nano /etc/systemd/system/rclone-mount.service

Add the following content to the file:


Replace <YOUR_USERNAME> with your actual username.


Save and close the file: In Nano, you can do this by pressing Ctrl + O to write the file, then Enter, and finally Ctrl + X to exit.


Reload systemd: After saving the service unit file, reload the systemd daemon to ensure it recognizes the new service:


sudo systemctl daemon-reload

Enable the service: You need to enable the service so it starts automatically on system boot:


sudo systemctl enable rclone-mount.service

Start the service: You can manually start the service now:


sudo systemctl start rclone-mount.service

Now, your remote directory should be mounted automatically on system startup. 🚀


Remember to replace pikpak: and /mnt/data/media/pikpak with your actual rclone remote and local mount path. Also, make sure rclone is installed in /usr/bin/rclone or specify the correct path in the ExecStart directive.


Note: If your rclone binary is installed in a different location, you’ll need to specify the correct path in the ExecStart directive of the systemd service unit file.


To find out where rclone is installed on your system, you can use the which command:


which rclone

After making this change, save the file, reload systemd, and restart the service as described in the previous instructions.


Disabling Automatic Mounting

If you no longer want the remote directory to be automatically mounted on system startup, you can remove the systemd service unit that you created earlier. Here’s how you can do it:


Disable the service: First, you should disable the systemd service to prevent it from starting automatically on system boot:


sudo systemctl disable rclone-mount.service

Stop the service: Next, stop the running instance of the service:


sudo systemctl stop rclone-mount.service

Remove the service file: Finally, you can remove the systemd service unit file that you created:


sudo rm /etc/systemd/system/rclone-mount.service

After completing these steps, the automatic mounting of the remote directory should be disabled, and the systemd service unit file will be removed from your system. 

Saturday, 17 July 2021

RcloneLab

 rclone GUI, qBittorrent and rTorrent on Google Colaboratory

minormole.github.io/rclonelab

What's new in RcloneLab 2.0?

  • Add rTorrent+Flood as an alternative torrent client; It has a beautiful UI and unique traits from qBittorrent.
  • Add Ubuntu Virtual Machine Updater.
  • Change output from text to HTML; more beautiful and easier to use.
  • Remove support for loading rclone.conf from Google Drive.
  • Code performance and logic improvement.
  • Fix can't use F5 when to enter qBittorrent WebUI for the first time.

Introduction

RcloneLab is a rclone GUI for Google Colaboratory, similar to Rclone Browser. Please consider contributing our project, any improved version of the code is welcome and much appreciate.

qBittorrent is a cross-platform free and open-source BitTorrent client.

Flood is a monitoring service for rTorrent BitTorrent client.

Google Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud with high speed network. Check the VM's specification here.

Installation Open In Colab

  1. Open the IPython Notebook file in Google Colaboratory by clicking here.

  2. Click "Run cell" (play button) and follow the instruction that show in the output.

Tip

We recommend to use Rclone Browser for file browsing and get path for RcloneLab.

from https://github.com/acamposxp/RcloneLab

Rclone 安装配置教程 - 连接 OneDrive 和 Google Drive

 

前言

Rclone 是一个的命令行工具,支持在不同对象存储、网盘间同步、上传、下载数据。并且通过一些设置可以实现离线下载、服务器备份等非常实用的功能。这里以 OneDrive 和 Google Drive 为例子,进行连接配置,其它网盘的操作类似。由于是交互式配置选项,只要能看懂基本没有任何难度。

安装 Rclone

官方提供了一键安装脚本:

curl https://rclone.org/install.sh | sudo bash

Rclone 连接 OneDrive

获取 token

在本地 Win­dows 电脑上下载 rclone: https://rclone.org/downloads/,然后解压出来,解压后进入文件夹,在资源管理器地址栏输入 cmd,回车就会在当前路径打开命令提示符。输入以下命令:

rclone authorize "onedrive"

接下来会弹出浏览器,要求你登录账号进行授权。授权完后命令提示符窗口会出现以下信息:

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
Paste the following into your remote machine --->
{"access_token":"xxxxxxxx"}  # 注意!复制{xxxxxxxx}整个内容,并保存好,后面需要用到
<---End paste

配置 Rclone

输入 rclone config 命令,会出现以下信息,参照下面的注释进行操作。

点击查看

TIPS: 因为 RCLONE 会时不时进行更新,当你看到这篇教程时菜单选项可能已经发生了略微的改动,但大致思路不会变,不要无脑照搬操作
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> n  # 选择n,新建
name> P3TERX   # 输入名称,类似于标签,用于区分不同的网盘。
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 / Mega
   \ "mega"
17 / Microsoft Azure Blob Storage
   \ "azureblob"
18 / Microsoft OneDrive
   \ "onedrive"
19 / OpenDrive
   \ "opendrive"
20 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
21 / Pcloud
   \ "pcloud"
22 / QingCloud Object Storage
   \ "qingstor"
23 / SSH/SFTP Connection
   \ "sftp"
24 / Webdav
   \ "webdav"
25 / Yandex Disk
   \ "yandex"
26 / http Connection
   \ "http"
Storage> 18  # 选择18,Microsoft OneDrive
** 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  # 选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> n  # 选n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine:
    rclone authorize "onedrive"
Then paste the result below:
result> {"XXXXXXXX"}  # 上面保存的token复制到这里
2018/10/31 19:54:06 ERROR : Failed to save new token in config file: section 'P3TERX' not found
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  # 这里问你要选择的类型,选1
Found 1 drives, please select the one you want to use:
0: OneDrive (business)
Chose drive to use:> 0  # 程序找到网盘,这里编号是0,就选择0
Found drive 'root' of type 'business', URL: https://xxxxxx-my.sharepoint.com/personal/xxxxxxx/Documents
Is that okay?
y) Yes
n) No
y/n> y  # 选y
--------------------
[P3TERX]
type = onedrive
token = {"XXXXXXXX"}
drive_id = XXXXXXXXX
drive_type = business
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y  # 选y
Current remotes:

Name                 Type
====                 ====
P3TERX               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  # 选q,退出

至此,Rclone 已成功连接到了 OneDrive 网盘。

Rclone 连接 Google Drive

与 OneDrive 不同的是,Google Drive 不需要本地 Win­dows 客户端预先进行授权获取 to­ken,而是在配置过程中进行授权。

输入 rclone config 命令,会出现以下信息,参照下面的注释进行操作。

点击查看

TIPS: 因为 RCLONE 会时不时进行更新,当你看到这篇教程时菜单选项可能已经发生了略微的改动,但大致思路不会变,不要无脑照搬操作
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> n  # 选择n,新建
name> Google  # 输入名称,类似于标签,用于区分不同的网盘。
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 / Mega
   \ "mega"
17 / Microsoft Azure Blob Storage
   \ "azureblob"
18 / Microsoft OneDrive
   \ "onedrive"
19 / OpenDrive
   \ "opendrive"
20 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
21 / Pcloud
   \ "pcloud"
22 / QingCloud Object Storage
   \ "qingstor"
23 / SSH/SFTP Connection
   \ "sftp"
24 / Webdav
   \ "webdav"
25 / Yandex Disk
   \ "yandex"
26 / http Connection
   \ "http"
Storage> 12  # 选择12,Google Drive
** See help for drive backend at: https://rclone.org/drive/ **

Google Application Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id>  # 留空,回车
Google Application Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>  # 留空,回车
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 1
ID of the root folder
Leave blank normally.
Fill in to access "Computers" folders. (see docs).
Enter a string value. Press Enter for the default ("").
root_folder_id>  # 留空,回车
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file>
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 or Y didn't work
y) Yes
n) No
y/n> n
If your browser doesn't open automatically go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=XXXXXXXXXXX.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=XXXXXXXXXXXXXXXXXXXX
Log in and authorize rclone for access  # 会弹出浏览器,要求你登录账号进行授权。如果没有弹出,复制上面的链接到浏览器中打开进行授权。
Enter verification 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--------------------
[Google]
type = drive
scope = drive
token = {"access_token":"XXXXXXXXXXXXXXXXXXXXX"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:

Name                 Type
====                 ====
Google               drive
P3TERX               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

至此,Rclone 已成功连接到了 Google Drive 网盘。

参考: https://rclone.org/docs/

------

Rclone 进阶使用教程 - 常用命令参数详解


前言

Rclone 是一个的命令行工具,支持在不同对象存储、网盘间同步、上传、下载数据。并且通过一些设置可以实现离线下载、服务器备份等非常实用的功能。本篇文章将讲解 Rclone 常用的一些命令参数。

安装 Rclone

Linux/macOS/BSD

官方提供了一键安装脚本:

curl https://rclone.org/install.sh | sudo bash

Windows

直接下载: https://rclone.org/downloads/

Rclone 设置

rclone config - 进入交互式配置选项,进行添加、删除、管理网盘等操作。

rclone config file - 显示配置文件的路径,一般配置文件在 ~/.config/rclone/rclone.conf

rclone config show - 显示配置文件信息

命令语法

# 本地到网盘
rclone [功能选项] <本地路径> <网盘名称:路径> [参数] [参数] ...

# 网盘到本地
rclone [功能选项] <网盘名称:路径> <本地路径> [参数] [参数] ...

# 网盘到网盘
rclone [功能选项] <网盘名称:路径> <网盘名称:路径> [参数] [参数] ...

用法示例

rclone move -v /Download Onedrive:/Download --transfers=1

常用功能选项

  • rclone copy - 复制
  • rclone move - 移动,如果要在移动后删除空源目录,请加上 --delete-empty-src-dirs 参数
  • rclone sync - 同步:将源目录同步到目标目录,只更改目标目录。
  • rclone size - 查看网盘文件占用大小。
  • rclone delete - 删除路径下的文件内容。
  • rclone purge - 删除路径及其所有文件内容。
  • rclone mkdir - 创建目录。
  • rclone rmdir - 删除目录。
  • rclone rmdirs - 删除指定灵境下的空目录。如果加上 --leave-root 参数,则不会删除根目录。
  • rclone check - 检查源和目的地址数据是否匹配。
  • rclone ls - 列出指定路径下的所有的文件以及文件大小和路径。
  • rclone lsl - 比上面多一个显示上传时间。
  • rclone lsd 列出指定路径下的目录
  • rclone lsf - 列出指定路径下的目录和文件

常用参数

  • -n = --dry-run - 测试运行,用来查看 rclone 在实际运行中会进行哪些操作。
  • -P = --progress - 显示实时传输进度,500mS 刷新一次,否则默认 1 分钟刷新一次。
  • --cache-chunk-size SizeSuffi - 块的大小,默认5M,理论上是越大上传速度越快,同时占用内存也越多。如果设置得太大,可能会导致进程中断。
  • --cache-chunk-total-size SizeSuffix - 块可以在本地磁盘上占用的总大小,默认10G。
  • --transfers=N - 并行文件数,默认为4。在比较小的内存的VPS上建议调小这个参数,比如128M的小鸡上使用建议设置为1。
  • --config string - 指定配置文件路径,string为配置文件路径。
  • --ignore-errors - 跳过错误。比如 OneDrive 在传了某些特殊文件后会提示Failed to copy: failed to open source object: malwareDetected: Malware detected,这会导致后续的传输任务被终止掉,此时就可以加上这个参数跳过错误。但需要注意 RCLONE 的退出状态码不会为0

日志

rclone 有 4 个级别的日志记录,ERRORNOTICEINFO 和 DEBUG。默认情况下,rclone 将生成 ERROR 和 NOTICE 级别消息。

  • -q - rclone将仅生成 ERROR 消息。
  • -v - rclone将生成 ERRORNOTICE 和 INFO 消息,推荐此项
  • -vv - rclone 将生成 ERRORNOTICEINFO和 DEBUG 消息。
  • --log-level LEVEL - 标志控制日志级别。

输出日志到文件

使用 --log-file=FILE 选项,rclone 会将 ErrorInfo 和 Debug 消息以及标准错误重定向到 FILE,这里的 FILE 是你指定的日志文件路径。

另一种方法是使用系统的指向命令,比如:

rclone sync -v Onedrive:/DRIVEX Gdrive:/DRIVEX > "~/DRIVEX.log" 2>&1

文件过滤

--exclude - 排除文件或目录。

--include - 包含文件或目录。

--filter - 文件过滤规则,相当于上面两个选项的其它使用方式。包含规则以 + 开头,排除规则以 - 开头。

文件类型过滤

比如 --exclude "*.bak"--filter "- *.bak",排除所有 bak 文件。也可以写作。

比如 --include "*.{png,jpg}"--filter "+ *.{png,jpg}",包含所有 png 和 jpg 文件,排除其他文件。

--delete-excluded 删除排除的文件。需配合过滤参数使用,否则无效。

目录过滤

目录过滤需要在目录名称后面加上 /,否则会被当做文件进行匹配。以 / 开头只会匹配根目录(指定目录下),否则匹配所目录。这同样适用于文件。

--exclude ".git/" 排除所有目录下的.git 目录。

--exclude "/.git/" 只排除根目录下的.git 目录。

--exclude "{Video,Software}/" 排除所有目录下的 Video 和 Software 目录。

--exclude "/{Video,Software}/" 只排除根目录下的 Video 和 Software 目录。

--include "/{Video,Software}/**" 仅包含根目录下的 Video 和 Software 目录的所有内容。

文件大小过滤

默认大小单位为 kBytes ,但可以使用 k ,M 或 G 后缀。

--min-size 过滤小于指定大小的文件。比如 --min-size 50 表示不会传输小于 50k 的文件。

--max-size 过滤大于指定大小的文件。比如 --max-size 1G 表示不会传输大于 1G 的文件。

TIPS: 博主在实际使用中发现大小过滤两个选项不能同时使用。

过滤规则文件

--filter-from <规则文件> 从文件添加包含 / 排除规则。比如 --filter-from filter-file.txt

过滤规则文件示例:

- secret*.jpg
+ *.jpg
+ *.png
+ file2.avi
- /dir/Trash/**
+ /dir/**
- *

这里只举例比较常用和简单的一些过滤用法,更复杂和高端的用法可以查看官方文档。

环境变量

rclone 中的每个选项都可以通过环境变量设置。环境变量的名称可以通过长选项名称进行转换,删除 -- 前缀,更改 - 为_,大写并添加前缀 RCLONE_。环境变量的优先级会低于命令行选项,即通过命令行追加相应的选项时会覆盖环境变量设定的值。

比如设置最小上传大小 --min-size 50,使用环境变量是 RCLONE_MIN_SIZE=50。当环境变量设置后,在命令行中使用 --min-size 100,那么此时环境变量的值就会被覆盖。

常用环境变量

  • RCLONE_CONFIG - 自定义配置文件路径
  • RCLONE_CONFIG_PASS - 若 rclone 进行了加密设置,把此环境变量设置为密码,可自动解密配置文件。
  • RCLONE_RETRIES - 上传失败重试次数,默认 3 次
  • RCLONE_RETRIES_SLEEP - 上传失败重试等待时间,默认禁用,单位smh分别代表秒、分钟、小时。
  • CLONE_TRANSFERS - 并行上传文件数。
  • RCLONE_CACHE_CHUNK_SIZE - 块的大小,默认5M,理论上是越大上传速度越快,同时占用内存也越多。如果设置得太大,可能会导致进程中断。
  • RCLONE_CACHE_CHUNK_TOTAL_SIZE - 块可以在本地磁盘上占用的总大小,默认10G。
  • RCLONE_IGNORE_ERRORS=true - 跳过错误。
-------------------------------

Rclone 使用教程 - 挂载 OneDrive、Google Drive 等网盘(Linux)


前言

Rclone 是一个的命令行工具,支持在不同对象存储、网盘间同步、上传、下载数据。并且通过一些设置可以实现离线下载、服务器备份等非常实用的功能。Rclone 有很多种使用方式,挂载是其中的一种。

友情提示: 挂载这个操作并不是必须的,作为一个实验性功能它有很多局限性和问题。挂载后并不能当做一个真正的磁盘来使用,在进行文件操作时会使用本地磁盘进行缓存,即占用本地磁盘空间。使用不当还可能造成磁盘写满、VPS卡死等问题。在 Google 上搜索“Rclone”,与之相关的最多的关键词就是“挂载”,这在一定程度上对很多刚接触的小伙伴造成了误导。要稳定的进行上传、下载、同步等操作建议使用 Rclone 的原生命令功能.

安装和配置 Rclone

官方提供了一键安装脚本:

curl https://rclone.org/install.sh | sudo bash

安装完后,输入 rclone config 命令进入交互式配置选项,按照提示一步一步来进行操作即可。 

安装 fuse

挂载需要安装 fuse,根据自己的系统来选择安装命令:

# Debian/Ubantu
apt-get update && apt-get install -y fuse
# CentOS
yum install -y fuse

挂载网盘

挂载网盘分为手动挂载和开机自动挂载,根据自己的需求来选择。

手动挂载

#挂载
rclone mount <网盘名称:网盘路径> <本地路径> [参数] --daemon

#取消挂载
fusermount -qzu <本地路径>

网盘名称为配置时填的 name网盘路径为网盘里的文件夹,留空为整个网盘,本地路径为 VPS 上的本地文件夹。参数可以查看官方文档根据需求进行选择。实际输入时不要有括号,这里只是为了更清楚的区分。--daemon 为进程守护参数,可后台运行。

使用示例

输入命令进行挂载操作:

rclone mount Onedrive:/ /Onedrive --copy-links --allow-other --allow-non-empty --umask 000 --daemon

然后输入 df -h 命令查看挂载情况。

root@P3TERX:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            286M     0  286M   0% /dev
tmpfs            60M  7.8M   52M  14% /run
/dev/sda1        99G   25G   71G  26% /
tmpfs           297M   24K  297M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           297M     0  297M   0% /sys/fs/cgroup
Onedrive:       5.0T  216G  4.8T   5% /Onedrive #这个就是挂载的网盘

取消挂载:

fusermount -qzu /Onedrive

开机自动挂载

  • 下载并编辑自启脚本
wget -N git.io/rcloned && nano rcloned
  • 修改内容:
NAME="Onedrive" #Rclone配置时填写的name
REMOTE=''  #远程文件夹,网盘里的挂载的一个文件夹,留空为整个网盘
LOCAL='/Onedrive'  #挂载地址,VPS本地挂载目录
  • 设置开机自启
mv rcloned /etc/init.d/rcloned
chmod +x /etc/init.d/rcloned
update-rc.d -f rcloned defaults # Debian/Ubuntu
chkconfig rcloned on # CentOS
bash /etc/init.d/rcloned start

看到 [信息] rclone 启动成功 ! 即可。

管理

开始挂载 bash /etc/init.d/rcloned start

停止挂载 bash /etc/init.d/rcloned stop

重新挂载 bash /etc/init.d/rcloned restart

查看日志 tail -f /$HOME/.rclone/rcloned.log

卸载自启挂载

bash /etc/init.d/rcloned stop
update-rc.d -f rcloned remove # Debian/Ubuntu
chkconfig rcloned off # CentOS
rm -f /etc/init.d/rcloned
-----------------------------------

Linux automatically mount any of Rclone's cloud storage systems as a file system with FUSE:

https://github.com/P3TERX/script/blob/master/rcloned

----------------------

相关帖子:https://briteming.blogspot.com/2017/12/rclone-google-drive.html

https://github.com/rclone/rclone