要说什么厉害 那就是做对拷的

安装

记得要安装最新版的哦

配置

~/.config/rclone/rclone.conf

sp

1
2
3
4
5
6
7
[sp]
type = onedrive
token = {"access_token":"","token_type":"Bearer","refresh_token":"[refresh_token]","expiry":"2026-03-01T01:01:01.4922688Z","expires_in":1}
client_id =
client_secret =
drive_id =
drive_type = documentLibrary

od

1
2
3
4
5
6
7
[od]
type = onedrive
token = {"access_token":"","token_type":"Bearer","refresh_token":"[refresh_token]","expiry":"2026-03-01T01:01:01.4922688Z","expires_in":1}
client_id =
client_secret =
drive_id = me
drive_type = personal

gd

1
2
3
4
5
6
7
8
[gd]
type = drive
client_id =
client_secret =
scope = drive
token = {"access_token":"access_token","refresh_token":"[refresh_token]","expiry":"2026-03-01T01:01:01.4922688Z"}
team_drive =
root_folder_id =

命令

1
2
rclone copy "/data/directory/" "mount:/files/directory/" --progress -v
rclone copy "/data/directory/file" "mount:/files/directory/" --progress --log-level DEBUG

挂载

/etc/systemd/system/rclone_mount.service

1
2
3
4
5
6
7
8
9
10
11
[Service]
Type=notify
ExecStart=rclone mount mount:files/ /data/storage/mount/ --vfs-cache-mode writes --no-check-certificate --buffer-size 256M --log-file /var/log/data/rclone_gd.log --log-level INFO
ExecStop=fusermount -u /data/storage/mount
Restart=on-failure
RestartSec=5
User=root
Group=root

[Install]
WantedBy=default.target
1
rclone mount mount:files/ /data/storage/mount/ --no-check-certificate