{"id":30046542,"url":"https://github.com/yuis-ice/mva","last_synced_at":"2025-08-07T08:15:56.341Z","repository":{"id":307853005,"uuid":"1030894508","full_name":"yuis-ice/mva","owner":"yuis-ice","description":"mva (mv-archive) - rclone backup/archiving simpler, efficient, and graceful. Just mv files to trigger automatic compression and cloud upload.","archived":false,"fork":false,"pushed_at":"2025-08-02T15:40:00.000Z","size":170,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T17:26:26.898Z","etag":null,"topics":["archive","automation","backup","chokidar","cli","cloud-backup","cloud-storage","commander-js","compression","cron-jobs","file-archiving","file-management","file-watching","mv-command","node-cron","nodejs-cli","rclone","tar-gz","typescript","yaml-config"],"latest_commit_sha":null,"homepage":"https://github.com/yuis-ice/mva","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuis-ice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-02T15:01:10.000Z","updated_at":"2025-08-02T15:40:03.000Z","dependencies_parsed_at":"2025-08-02T17:26:30.889Z","dependency_job_id":"89b0cc13-a972-401d-9d3c-c4ade36d4394","html_url":"https://github.com/yuis-ice/mva","commit_stats":null,"previous_names":["yuis-ice/mva"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yuis-ice/mva","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fmva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fmva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fmva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fmva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuis-ice","download_url":"https://codeload.github.com/yuis-ice/mva/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuis-ice%2Fmva/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269220942,"owners_count":24380686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archive","automation","backup","chokidar","cli","cloud-backup","cloud-storage","commander-js","compression","cron-jobs","file-archiving","file-management","file-watching","mv-command","node-cron","nodejs-cli","rclone","tar-gz","typescript","yaml-config"],"created_at":"2025-08-07T08:15:54.286Z","updated_at":"2025-08-07T08:15:56.335Z","avatar_url":"https://github.com/yuis-ice.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mva (mv-archive)\n\n\u003e rclone backup/archiving simpler, efficient, and graceful\n\n![mva Demo](screenshot.png)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen)](https://nodejs.org/)\n[![npm](https://img.shields.io/npm/v/mva)](https://www.npmjs.com/package/mva)\n\n## Overview\n\n**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.\n\n## Why mva?\n\n- **Safety**: Files are safely archived with compression and proper naming\n- **Bandwidth optimized**: Uses rclone for efficient cloud transfers\n- **Cognitive load minimized**: Just `mv` files to trigger archiving\n\n## Installation\n\n```bash\n# Clone and install\ngit clone \u003crepository\u003e\ncd mv-archive-dev\nnpm install\nnpm run build\n\n# Make globally available (optional)\nnpm link\n```\n\n## Quick Start\n\n1. **Initialize configuration**:\n   ```bash\n   mva init\n   ```\n\n2. **Edit configuration** at `~/.mva/config.yml`:\n   ```yaml\n   directories:\n     - directory: \"/srv/mva/gdrive\"\n       at: \"0 2 * * *\"  # Daily at 2 AM\n       format: \"{humanTime}-{filename}.{ext}\"\n       compress: \"tar.gz\"\n       destination: \"gdrive:archive\"\n   ```\n\n3. **Setup watch directories**:\n   ```bash\n   mva setup-directories\n   ```\n\n4. **Start the daemon**:\n   ```bash\n   mva start\n   ```\n\n5. **Archive files by moving them**:\n   ```bash\n   mv document.pdf /srv/mva/gdrive/\n   mv backup.tar.gz /srv/mva/azure/archive/\n   ```\n\n## Commands\n\n### `mva init`\nInitialize mva configuration file at `~/.mva/config.yml` with default settings.\n\n### `mva start`\nStart the mva daemon to watch configured directories. Files moved to these directories will be automatically archived.\n\n### `mva archive \u003cfiles...\u003e -d \u003cdestination\u003e`\nManually archive files to a specific destination:\n```bash\nmva archive file1.txt file2.pdf -d gdrive\n```\n\n### `mva status`\nShow current configuration and status.\n\n### `mva setup-directories`\nCreate all watch directories defined in the configuration.\n\n## Configuration\n\nThe configuration file is located at `~/.mva/config.yml`:\n\n```yaml\ndirectories:\n  - directory: \"/srv/mva/gdrive\"      # Watch directory\n    at: \"0 2 * * *\"                  # Cron schedule\n    format: \"{humanTime}-{filename}.{ext}\"  # Archive filename format\n    compress: \"tar.gz\"               # Compression method\n    destination: \"gdrive:archive\"    # rclone destination\n\n  - directory: \"/srv/mva/azure/archive\"\n    at: \"0 3 * * *\"\n    format: \"{humanTime}-{filename}.{ext}\"\n    compress: \"tar.gz\"\n    destination: \"azure:backup\"\n```\n\n### Configuration Options\n\n- **directory**: Local directory to watch for files\n- **at**: Cron schedule for batch processing (also processes files immediately)\n- **format**: Filename format for archived files with placeholders:\n  - `{humanTime}`: ISO timestamp (e.g., `2025-08-02_14-30-00`)\n  - `{filename}`: Original filename without extension\n  - `{ext}`: Original file extension\n  - `{timestamp}`: Unix timestamp\n  - `{date}`: Date in YYYY-MM-DD format\n  - `{time}`: Time in HH-MM-SS format\n- **compress**: Compression method (`tar.gz` or `none`)\n- **destination**: rclone remote and path (e.g., `myremote:path/to/backup`)\n\n## Prerequisites\n\n- **rclone**: Must be installed and configured with your cloud providers\n- **Node.js**: Version 16 or higher\n\n### Setting up rclone\n\n```bash\n# Install rclone\ncurl https://rclone.org/install.sh | sudo bash\n\n# Configure your cloud providers\nrclone config\n\n# Test connection\nrclone lsd myremote:\n```\n\n## How It Works\n\n1. **File Detection**: mva watches configured directories for new files\n2. **Processing**: When a file is detected:\n   - File is copied to a temporary location\n   - Compressed (if configured)\n   - Renamed according to the format template\n   - Uploaded to the rclone destination\n   - Original file is removed\n3. **Scheduling**: Cron jobs also run at scheduled times to process any remaining files\n\n## Examples\n\n### Basic Usage\n```bash\n# Start daemon\nmva start\n\n# Archive a document (in another terminal)\nmv ~/Documents/report.pdf /srv/mva/gdrive/\n# → Uploads as \"2025-08-02_14-30-00-report.tar.gz\" to gdrive:archive\n```\n\n### Manual Archiving\n```bash\n# Archive specific files immediately\nmva archive *.log -d gdrive\n```\n\n### Multiple Destinations\n```yaml\ndirectories:\n  - directory: \"/srv/mva/daily\"\n    at: \"0 2 * * *\"  # Daily\n    destination: \"gdrive:daily-backup\"\n    \n  - directory: \"/srv/mva/weekly\"  \n    at: \"0 3 * * 0\"  # Weekly (Sundays)\n    destination: \"s3:weekly-archive\"\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run in development mode\nnpm run dev\n\n# Build for production\nnpm run build\n\n# Run built version\nnpm start\n```\n\n## Troubleshooting\n\n### rclone Issues\n```bash\n# Test rclone connection\nrclone lsd your-remote:\n\n# Check rclone config\nrclone config show\n```\n\n### Permission Issues\nEnsure the user running mva has:\n- Read/write access to watch directories\n- Execute permissions for rclone\n- Write access to `/tmp` for temporary files\n\n### File Not Archived\n- Check that files are completely written before moving\n- Verify rclone destination is accessible\n- Check mva daemon logs\n\n## License\n\nISC\n\n## Contributing\n\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n- 🐛 [Report bugs](../../issues/new?template=bug_report.yml)\n- ✨ [Request features](../../issues/new?template=feature_request.yml)\n- 💬 [Join discussions](../../discussions)\n- 📖 [Improve documentation](CONTRIBUTING.md)\n\n## Support\n\n- 📚 [Documentation](README.md)\n- 💬 [Discussions](../../discussions)\n- 🐛 [Issues](../../issues)\n- 🔧 [rclone Documentation](https://rclone.org/docs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuis-ice%2Fmva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuis-ice%2Fmva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuis-ice%2Fmva/lists"}