Rclone

Thêm Rclone vào hệ thống PATH (Windows nhận diện lệnh Rclone ở mọi nơi)

Cách làm thủ công:

  1. Nhấn Win + R, gõ sysdm.cpl, nhấn Enter.
  2. Chuyển sang tab Advanced, nhấn Environment Variables.
  3. Ở mục System variables, chọn Path và nhấn Edit.
  4. Nhấn New, nhập đường dẫn đến thư mục chứa rclone.exe, ví dụ:
    makefile
    Sao chépChỉnh sửa
    C:\rclone
  5. Nhấn OK để lưu lại.
  6. Đóng cửa sổ, khởi động lại máy để cập nhật.

Tăng tốc và tối ưu tốc độ Copy File

📌 Giới hạn băng thông để tránh nghẽn mạng

powershell
Sao chépChỉnh sửa
rclone copy "C:\DATA\VIDEOS" "myvps:/home/user/videos" --bwlimit=10M -P

📌 Giới hạn tốc độ copy là 10MB/s để tránh nghẽn băng thông.

📌 Copy file với nhiều luồng để tăng tốc

powershell
Sao chépChỉnh sửa
rclone copy "C:\DATA\VIDEOS" "myvps:/home/user/videos" --transfers=8 --checkers=8 -P

📌 Sử dụng 8 luồng tải lên giúp tăng tốc độ upload file.

📌 Chuyển đổi file lớn thành file nhỏ để tránh bị giới hạn

powershell
Sao chépChỉnh sửa
rclone copy "C:\DATA\VIDEOS" "myvps:/home/user/videos" --s3-chunk-size=32M -P

📌 Dùng khi upload lên các dịch vụ như S3 hoặc Google Drive để tránh bị hạn chế file lớn.

Chạy Rclone WebUI (Giao diện Web)

powershell
Sao chépChỉnh sửa
rclone rcd --rc-web-gui

📌 Mở giao diện WebUI để quản lý file bằng trình duyệt.

rclone copy "C:\DATA" "App:/www/dk_project" --transfers=8 --checkers=16 --bwlimit=off -P

rclone copy "E:\GIẢI TRÍ\Street Fighter X Tekken\stream\Chinese" "webb:/www/dk_project/dk_app/jellyfin/jellyfin_AsJi/media/Chinese" --transfers=8 --checkers=16 --bwlimit=off -P

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

Mount Google Drive với Nextcloud:

rclone mount onedrive: /mnt/onedrive --allow-other --vfs-cache-mode full --vfs-read-ahead 512M --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G --buffer-size 256M --drive-chunk-size 128M --dir-cache-time 12h --poll-interval 10s --daemon

rclone mount gdrive:"MediaSME Agency" /mnt/gdrive --allow-other --vfs-cache-mode full --vfs-read-ahead 512M --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G --buffer-size 256M --drive-chunk-size 128M --dir-cache-time 12h --poll-interval 10s --daemon

- Tự mount khi khởi động lại VPS:

sudo crontab -e

- Thêm vào cuối:

@reboot /usr/bin/rclone mount onedrive: /mnt/onedrive --allow-other --vfs-cache-mode full --vfs-read-ahead 512M --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G --buffer-size 256M --drive-chunk-size 128M --dir-cache-time 12h --poll-interval 10s --daemon

@reboot /usr/bin/rclone mount gdrive:"MediaSME Agency" /mnt/gdrive --allow-other --vfs-cache-mode full --vfs-read-ahead 512M --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 1G --buffer-size 256M --drive-chunk-size 128M --dir-cache-time 12h --poll-interval 10s --daemon

Ctrl + X -> Y -> Enter

- Hủy Mount:

fusermount -u /mnt/gdrive

- Kiểm tra file cache trên rclone: ls -lah ~/.cache/rclone/vfs/gdrive

- Xóa file cache trên rclone: rm -rf ~/.cache/rclone/vfs/gdrive => fusermount -u /mnt/gdrive => (re-mount)

Hoặc: rclone rc vfs/forget

Did you find this article useful?