rclone backup/archiving simpler, efficient, and graceful
License: MIT Node.js Version npm
mva is a CLI tool that makes file archiving and cloud backup as simple as moving files to a directory. It automatically compresses, timestamps, and uploads files to configured rclone destinations using a simple mv operation.
- Safety: Files are safely archived with compression and proper naming
- Bandwidth optimized: Uses rclone for efficient cloud transfers
- Cognitive load minimized: Just
mvfiles to trigger archiving
# Clone and install git clone <repository> cd mv-archive-dev npm install npm run build # Make globally available (optional) npm link
-
Initialize configuration:
mva init
-
Edit configuration at
~/.mva/config.yml:directories: - directory: "/srv/mva/gdrive" at: "0 2 * * *" # Daily at 2 AM format: "{humanTime}-{filename}.{ext}" compress: "tar.gz" destination: "gdrive:archive"
-
Setup watch directories:
mva setup-directories
-
Start the daemon:
mva start
-
Archive files by moving them:
mv document.pdf /srv/mva/gdrive/ mv backup.tar.gz /srv/mva/azure/archive/
Initialize mva configuration file at ~/.mva/config.yml with default settings.
Start the mva daemon to watch configured directories. Files moved to these directories will be automatically archived.
Manually archive files to a specific destination:
mva archive file1.txt file2.pdf -d gdrive
Show current configuration and status.
Create all watch directories defined in the configuration.
The configuration file is located at ~/.mva/config.yml:
directories: - directory: "/srv/mva/gdrive" # Watch directory at: "0 2 * * *" # Cron schedule format: "{humanTime}-{filename}.{ext}" # Archive filename format compress: "tar.gz" # Compression method destination: "gdrive:archive" # rclone destination - directory: "/srv/mva/azure/archive" at: "0 3 * * *" format: "{humanTime}-{filename}.{ext}" compress: "tar.gz" destination: "azure:backup"
- directory: Local directory to watch for files
- at: Cron schedule for batch processing (also processes files immediately)
- format: Filename format for archived files with placeholders:
{humanTime}: ISO timestamp (e.g.,2025年08月02日_14-30-00){filename}: Original filename without extension{ext}: Original file extension{timestamp}: Unix timestamp{date}: Date in YYYY-MM-DD format{time}: Time in HH-MM-SS format
- compress: Compression method (
tar.gzornone) - destination: rclone remote and path (e.g.,
myremote:path/to/backup)
- rclone: Must be installed and configured with your cloud providers
- Node.js: Version 16 or higher
# Install rclone curl https://rclone.org/install.sh | sudo bash # Configure your cloud providers rclone config # Test connection rclone lsd myremote:
- File Detection: mva watches configured directories for new files
- Processing: When a file is detected:
- File is copied to a temporary location
- Compressed (if configured)
- Renamed according to the format template
- Uploaded to the rclone destination
- Original file is removed
- Scheduling: Cron jobs also run at scheduled times to process any remaining files
# Start daemon mva start # Archive a document (in another terminal) mv ~/Documents/report.pdf /srv/mva/gdrive/ # → Uploads as "2025-08-02_14-30-00-report.tar.gz" to gdrive:archive
# Archive specific files immediately mva archive *.log -d gdrive
directories: - directory: "/srv/mva/daily" at: "0 2 * * *" # Daily destination: "gdrive:daily-backup" - directory: "/srv/mva/weekly" at: "0 3 * * 0" # Weekly (Sundays) destination: "s3:weekly-archive"
# Install dependencies npm install # Run in development mode npm run dev # Build for production npm run build # Run built version npm start
# Test rclone connection rclone lsd your-remote: # Check rclone config rclone config show
Ensure the user running mva has:
- Read/write access to watch directories
- Execute permissions for rclone
- Write access to
/tmpfor temporary files
- Check that files are completely written before moving
- Verify rclone destination is accessible
- Check mva daemon logs
ISC
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- histbak — Scheduled, compressed, optionally encrypted backups of your browsing history, plus a viewer that makes it readable. Local only, no network access...
- dead-mans-ping — Cross-platform CLI that HTTP-GET pings endpoints on mouse (in)activity — dead-man's switch, presence beacon, idle notifier.
- simple-ots — Hash files, build a Merkle tree, anchor to Bitcoin via OpenTimestamps. Selective disclosure without ZKP.
- http-status-monitor — CLI that runs lychee against a URL list and tracks HTTP status/asset changes over time
- git-dup — Snapshot a git subdirectory (committed state + untracked files) into a timestamped sibling directory
- dir-cpu — Real-time CLI that shows CPU usage aggregated by filesystem directory
- cf-cache-utils — CLI to warm and inspect Cloudflare edge cache status across all your URLs — no external dependencies, pure Node.js
- notification-cli — Minimalistic Command Line Notification Application under 50 Lines
- node-cron-cli — Command Line Implementation for Node Cron Under 20 Lines.