β‘ Proton Drive Backup β‘
β Info All dependencies satisfied.
β Info Checking authentication session...
β Success Session is valid.
β Info Backup Configuration:
Conflict strategy replace
Delete mode trash
Dry run false
Reset checksum database false
β Info Scan /home/martin/Documents
β Info Scan /home/martin/Music
β Info Scan /home/martin/Pictures
β Info Scan /home/martin/Projects
β Info Scan /home/martin/Templates
β Info Scan /home/martin/Videos
β Info Database built: 117640 files, 309GiB total.
β Info Comparing local files against previous backup state...
β Process βββββββββββββββββββββββββββ 1460/11764 (12%, 32GiB)- Purpose
- Features
- Requirements
- Installation
- Configuration
- Quick Start
- Usage
- Logging
- Localization
- Known Limitations
- Security Notes
- Troubleshooting
- Contributing
- Help
- Appendix
One-way backup tool that mirrors local directories to Proton Drive using the official Proton Drive CLI.
Disclaimer β This is an unofficial community tool. RML Tec Dev is not affiliated with, endorsed or supported by Proton AG. "Proton Drive" is a trademark of Proton AG. Proton AG is not responsible for this tool's functionality or maintenance.
- One-way synchronization: local system is the single source of truth β this tool never deletes, moves, or modifies local files
- MD5-based change detection against a persistent local JSON database
(no remote hash data required). - Upload conflict strategies:
replaceorskip. - Orphan handling: recoverable trash or permanent deletion.
- Cron scheduling with configurable interval.
- Run-scoped logging with automatic archiving and retention.
- English, German and Thai localization.
- Graceful terminal-resize degradation; no data loss on interrupted runs (instance locking via PID-validated lock file).
- An authenticated Proton Drive account (login handled interactively on first run)
proton-driveCLI v0.4.6 or higher (https://proton.me/drive/cli)jq,md5sum,tar, GNUfind- bash 4.2 or higher
./install.sh
The installer places the script on your PATH and copies the example configuration to ~/.config/proton-drive-backup/proton-drive-backup.cfg on first installation. Existing configurations are never overwritten β updates never destroy user settings.
All user decisions live in the config file above.
Key variables
| *Variable` | Values | Description |
|---|---|---|
SOURCE_BASE |
path | Base directory for relative entries |
SOURCE_DIRS |
list of paths | Directories to back up |
REMOTE_BASE_PATH |
/my-files/... |
Remote target folder |
DELETE_MODE |
trash | delete |
Orphan handling (default: trash) |
UPLOAD_CONFLICT_STRATEGY |
replace | skip |
Remote name collisions |
CRON_INTERVAL_MINUTES |
positive integer | Interval for --schedule |
KEEP_LOG_RUNS |
integer | Archived runs retained |
Recommendation
Keep DELETE_MODE=trash. It is deliberately the default β a brake instead of a brakeless delete. Clear the Proton Drive trash periodically after verifying your backups.
- First contact: see what would happen β nothing is executed
proton-drive-backup --dry-run- Then run for real
proton-drive-backup --verbose # to observe progress
proton-drive-backup --quiet # to automatize as cron job- Follow what the tool does
proton-drive-backup --logInvoked without options, the tool shows a status menu.
| Option | Description |
|---|---|
--dry-run |
Display pending changes; no action taken |
--help |
Man-page style help; quits with Q |
--log |
Open and follow the runtime log |
--quiet |
Minimal output for cron jobs (errors + summary) |
--reset-db |
Discard and rebuild the checksum database |
--schedule |
Install cron job (interval from config) |
--unschedule |
Remove the cron job |
--verbose |
Progress indicators during processing |
--version |
Version and CLI information |
Logs are run-scoped and live in ~/.local/state/proton-drive-backup/. At the start of each run, the previous run's logs are archived as a timestamped <UTC-stamp>.tar.gz; the newest KEEP_LOG_RUNS archives are retained.
Inspect an archive without extracting:
tar -xzOf <stamp>.tar.gz
Language files ship next to the script (proton-drive-backup.en, proton-drive-backup.de, proton-drive-backup.th). Language selection follows your LANG environment variable. Column alignment requires a generated UTF-8 locale (e.g. de_DE.UTF-8) β see FAQ.
Contributing a translation: see MESSAGES.
- Renamed files appear as delete and upload; in trash mode they accumulate in the Proton Drive trash until it is cleared manually.
- Empty remote directories are not removed (CLI limitation).
- MD5 comparison is content-based; it is not a cryptographic guarantee against deliberate collisions.
- Thumbnail uploads are skipped (
--skip-thumbnails).
- The tool only reads local files (hashing and uploading). Deletion happens exclusively on the remote side, for files you deleted locally yourself.
- Credentials remain exclusively in the official Proton Drive CLI β this script never reads or stores them.
- The lock file prevents concurrent runs from interleaving operations.
- Review the locale and config files before use: they are sourced as Bash (documented in each file's header).
See FAQ for common issues (misaligned columns, locale generation, terminal resize behavior, cron environments).
PRs welcome β see CONTRIBUTING for code style, localization rules, and testing requirements (clean shellcheck, passing smoketest).
The script includes a built-in "Man Page" style help viewer.
- Invoke via:
./proton-drive-backup --help - It pipes localized documentation into the
lesspager, allowing for scrolling and searching within the help text.
Use at your own risk. Test thoroughly; files deleted locally are removed from your Proton Drive backup during the next run.
This script is provided "as is"; there is NO WARRANTY at all.
This is free software: you are free to modify it to your needs and redistribute it under the MIT License.
Copyright (c) 2026 RML Tec Dev
Contributions and feedback are welcome via rmltecdev@pm.me.
Licensed under the MIT License β see LICENSE for details.
Version: v1.0.0 Build Date: 2026-09-09