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:
- Nhấn
Win + R, gõsysdm.cpl, nhấn Enter. - Chuyển sang tab Advanced, nhấn Environment Variables.
- Ở mục System variables, chọn Path và nhấn Edit.
- Nhấn New, nhập đường dẫn đến thư mục chứa
rclone.exe, ví dụ: - Nhấn OK để lưu lại.
- Đó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
📌 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
📌 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
📌 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)
📌 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