rclone backup/archiving simpler, efficient, and graceful
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 gdriveShow 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 gdrivedirectories:
- 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 showEnsure 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.
- π Report bugs
- β¨ Request features
- π¬ Join discussions
- π Improve documentation
- π Documentation
- π¬ Discussions
- π Issues
- π§ rclone Documentation