brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: rclone takes a bandwidth timetable, so uploads slow down by day

Rclone
~/tips/tip-rclone-bwlimit-timetable

rclone copy /data remote:data --bwlimit "08:00,1M 18:00,5M 23:00,off" -P

Throttles a long upload during working hours and opens it up at night.

A first upload of a few hundred gigabytes can run for days. You don’t have to choose between a crawling connection all day and a crawling upload all night.

--bwlimit takes a list of times with a limit for each:

rclone copy /data remote:data --bwlimit "08:00,1M 18:00,5M 23:00,off" -P

From eight in the morning the limit is 1 MiB per second, at six it rises to 5, and from eleven at night there is none. A single long running command picks up each change on its own.

Days can be included, written in full or with three letters:

--bwlimit "Mon-08:00,1M Sat-00:00,off"

I’d double check the units. The numbers are bytes per second, so 1M is a little over 8 Mbit on your provider’s scale. A bare number means KiB. Upload and download can differ with a colon, as in 10M:off.

On Linux and similar systems you can also toggle the limiter on a running process, for when you’re off to bed early:

kill -SIGUSR2 $(pidof rclone)

That hits every rclone process the command finds, so check that you only have the one. The limit applies to the process as a whole, so two rclone jobs at once each get their own allowance and together use twice what you intended. --bwlimit-file limits each file instead, which is a different knob.

Further reading: rclone docs: bwlimit

More Rclone tips rclone copyurl https://example.com/files/big.iso remote:isos -a rclone size remote:photos rclone config redacted rclone ncdu remote:backup rclone lsf -R --files-only --format tsp remote:photos All Rclone tips (14) All topics

Link