Automated, event-driven backup for Proton Drive on Linux using rclone and systemd.
- Efficient: Only triggers on file changes — no cron needed.
- Minimal: Lightweight
oneshotservice with no background processes. - Smart: Reads Proton Drive before uploading — only sends new or modified files.
rcloneinstalled and available in$PATH- A Proton Drive remote configured via
rclone config(see rclone Proton Drive docs)
-
Clone the repo:
git clone https://github.com/l0wa1r/proton-rclone-sync ~/.local/share/proton-sync cd ~/.local/share/proton-sync
-
Copy the unit files:
mkdir -p ~/.config/systemd/user/ cp proton-sync.service proton-sync.path ~/.config/systemd/user/
-
Configure the filter file:
Copy the example filter and edit it to match your folder structure:
mkdir -p ~/.config/rclone/ cp proton.filter ~/.config/rclone/proton.filter
-
Enable and start:
systemctl --user daemon-reload systemctl --user enable --now proton-sync.path
The path watcher monitors your configured folders and automatically triggers a sync when files change. To monitor logs in real time:
journalctl --user -u proton-sync.service -fTo trigger a manual sync:
systemctl --user start proton-sync.service &
journalctl --user -u proton-sync.service -fThe service assumes your Proton Drive remote is named proton. To check your remote name:
rclone listremotesIf your remote has a different name, edit ~/.config/systemd/user/proton-sync.service and replace proton: with your remote name, then run systemctl --user daemon-reload.
Edit ~/.config/rclone/proton.filter to control which folders are synced:
+ /Documents/**
+ /Pictures/**
+ /Videos/**
- /Downloads/**
- /.*
- *
Rules are processed top to bottom. A + includes the path, - excludes it. The final - * excludes everything not explicitly included.
Note: The path watcher (
proton-sync.path) monitors the same folders listed here. If you add or remove folders from this filter, updateproton-sync.pathaccordingly and runsystemctl --user daemon-reload.
422 errors from Proton Drive: Usually caused by a corrupted draft stuck on Proton's side. Find the failing file in the logs and delete it from Proton Drive via web, then retry. The service is tuned to minimize these (--transfers 1, --tpslimit 1, --protondrive-replace-existing-draft=true).
Sync not triggering: Make sure the path watcher is active:
systemctl --user status proton-sync.path