{"id":29104574,"url":"https://github.com/andreas-glaser/qbak","last_synced_at":"2026-03-27T02:29:12.190Z","repository":{"id":297048575,"uuid":"995446530","full_name":"andreas-glaser/qbak","owner":"andreas-glaser","description":"A single-command backup helper for Linux and POSIX systems written in Rust.","archived":false,"fork":false,"pushed_at":"2025-06-27T16:57:53.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-27T17:46:11.238Z","etag":null,"topics":["backup","cli","copy","timestamp"],"latest_commit_sha":null,"homepage":"https://github.com/andreas-glaser/qbak","language":"Rust","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/andreas-glaser.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-06-03T13:47:31.000Z","updated_at":"2025-06-27T16:55:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"1dd39519-2daa-4475-8e84-ba05563c98de","html_url":"https://github.com/andreas-glaser/qbak","commit_stats":null,"previous_names":["andreas-glaser/qbak"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/andreas-glaser/qbak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-glaser%2Fqbak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-glaser%2Fqbak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-glaser%2Fqbak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-glaser%2Fqbak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreas-glaser","download_url":"https://codeload.github.com/andreas-glaser/qbak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreas-glaser%2Fqbak/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262307340,"owners_count":23291070,"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","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":["backup","cli","copy","timestamp"],"created_at":"2025-06-29T00:06:10.755Z","updated_at":"2026-03-27T02:29:12.185Z","avatar_url":"https://github.com/andreas-glaser.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"backup\"\u003e\u003c/a\u003eBackup"],"sub_categories":[],"readme":"# qbak - Quick Backup\n\n[![CI](https://github.com/andreas-glaser/qbak/workflows/CI/badge.svg)](https://github.com/andreas-glaser/qbak/actions/workflows/ci.yml)\n[![Security](https://github.com/andreas-glaser/qbak/workflows/Security/badge.svg)](https://github.com/andreas-glaser/qbak/actions/workflows/security.yml)\n[![Documentation](https://github.com/andreas-glaser/qbak/workflows/Documentation/badge.svg)](https://github.com/andreas-glaser/qbak/actions/workflows/docs.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Crates.io](https://img.shields.io/crates/v/qbak.svg)](https://crates.io/crates/qbak)\n\nA single-command backup helper for Linux and POSIX systems written in Rust.\n\n## Overview\n\n`qbak` creates timestamped backup copies of files and directories with zero configuration. It's designed for quick, safe backups with sensible defaults.\n\n```bash\nqbak example.txt        → example-20250603T145231-qbak.txt\nqbak photos/            → photos-20250603T145232-qbak/\n```\n\n## Why qbak?\n\nHave you ever found yourself editing important files or directories and wanting to create a quick local backup first? You know the routine: `cp myconfig.conf backup-myconfig.conf` or something similar. But then you realize your backup naming lacks consistency-no timestamps, no predictable convention, just ad-hoc names that become meaningless over time.\n\nThat's exactly where `qbak` comes in. It's a super simple tool designed for lightning-fast local backups with a consistent, timestamped naming convention. Nothing more, nothing less. Just the backup utility you wish you'd had all along.\n\n## Features\n\n- **Zero-config** - runs with sensible defaults; no config files required\n- **Safe \u0026 atomic** - never overwrite existing data; fail loudly on errors\n- **Security-hardened** - comprehensive protection against path traversal, disk exhaustion, and race condition attacks\n- **Cross-platform** - primary target is Linux; works on macOS and Windows (WSL) too\n- **Tiny static binary** - single executable with no dependencies\n- **Smart progress indication** - automatic progress bars for large operations with adaptive terminal layouts\n\n## Installation\n\n### From GitHub Releases (Recommended)\n\nDownload the latest release from [GitHub Releases](https://github.com/andreas-glaser/qbak/releases):\n\n```bash\n# Download the latest release for Linux x86_64\nwget https://github.com/andreas-glaser/qbak/releases/latest/download/qbak-linux-x86_64.tar.gz\ntar -xzf qbak-linux-x86_64.tar.gz\n\n# Install system-wide (requires sudo)\nsudo cp qbak /usr/bin/\n\n# Or install for current user only\nmkdir -p ~/.local/bin\ncp qbak ~/.local/bin/\n\n# Check if it is installed correctly\nqbak --version\n```\n\n**Available releases:**\n- `qbak-linux-x86_64.tar.gz` - Linux x86_64 (glibc)\n- `qbak-linux-x86_64-musl.tar.gz` - Linux x86_64 (musl, static binary)\n- `qbak-linux-arm64.tar.gz` - Linux ARM64 (glibc, for Raspberry Pi 4/5, ARM64 servers)\n- `qbak-linux-arm64-musl.tar.gz` - Linux ARM64 (musl, static binary)\n- `qbak-linux-armv7l.tar.gz` - Linux ARMv7l (glibc, for Raspberry Pi 2/3, ARMv7 devices)\n- `qbak-macos-x86_64.tar.gz` - macOS x86_64 (Intel)\n- `qbak-macos-arm64.tar.gz` - macOS ARM64 (Apple Silicon)\n- `qbak-windows-x86_64.zip` - Windows x86_64\n\n### From Source\n\n```bash\ngit clone https://github.com/andreas-glaser/qbak.git\ncd qbak\ncargo build --release\nsudo cp target/release/qbak /usr/bin/\n```\n\n### Prerequisites\n\n- Rust 1.71 or later (for building from source)\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Backup a single file\nqbak important.txt\n\n# Backup multiple files\nqbak file1.txt file2.txt config.json\n\n# Backup a directory\nqbak my-project/\n\n# Backup multiple directories\nqbak docs/ src/ tests/\n```\n\n### Command Line Options\n\n```bash\nqbak [OPTIONS] [TARGET]...\n\nArguments:\n  [TARGET]...      Files or directories to back up\n\nOptions:\n  -n, --dry-run        Show what would be backed up without doing it\n  -v, --verbose        Show detailed progress information\n  -q, --quiet          Suppress all output except errors\n      --progress       Force progress indication even for small operations\n      --no-progress    Disable progress indication\n      --dump-config    Display current configuration settings and exit\n  -h, --help           Print help\n  -V, --version        Print version\n```\n\n### Examples\n\n```bash\n# Dry run to see what would be backed up\nqbak --dry-run important.txt\n# Output: Would create backup: important-20250603T145231-qbak.txt (1.2 KB)\n\n# Verbose output for detailed information\nqbak --verbose my-project/\n# Output: \nProcessed: my-project/\n  → my-project-20250603T145232-qbak/\n  Files: 42\n  Size: 15.3 MB\n  Duration: 0.12s\n\n# Quiet mode (only errors)\nqbak --quiet *.txt\n\n# Force progress indication for small operations\nqbak --progress single-file.txt\n# Output: Shows progress bar even for small files\n\n# Disable progress indication for large operations\nqbak --no-progress large-directory/\n# Output: No progress bars, even for operations that normally show them\n\n# Check current configuration\nqbak --dump-config\n# Output: Shows config file location, all settings, and example backup names\n```\n\n## Progress Indication\n\n`qbak` automatically shows progress bars for large backup operations to keep you informed during lengthy transfers.\n\n### Smart Auto-Detection\n\nProgress indication is automatically enabled when operations meet any of these thresholds:\n- **≥50 files** to process\n- **≥10 MB** total data size  \n- Operations taking longer than expected\n\nThe progress display adapts to your terminal:\n- **Wide terminals (≥120 cols)**: Full progress with file details, transfer rates, and ETA\n- **Normal terminals (≥80 cols)**: Compact progress with essential information\n- **Narrow terminals**: Minimal progress indication\n\n### Two-Phase Progress\n\nFor directory backups, `qbak` shows progress in two phases:\n\n1. **Scanning Phase**: Discovers files and calculates total size\n   ```\n   ⠋ Scanning files... 127 files found, current: photo.jpg\n   ```\n\n2. **Backup Phase**: Copies files with detailed progress\n   ```\n   [████████████████████████████████] 127/127 files (100%) • 45.2 MB/45.2 MB • 12.3 MB/s • ETA: 0s • Processing: document.pdf\n   ```\n\n### Manual Control\n\n- `--progress`: Force progress indication even for small operations\n- `--no-progress`: Disable progress indication entirely\n- Configuration file settings override auto-detection\n\n### Interactive vs Non-Interactive\n\nProgress bars are only shown in interactive terminals. In CI environments, scripts, or when output is redirected, progress indication is automatically disabled to avoid cluttering logs.\n\n## Naming Scheme\n\nBackup files follow the pattern:\n```\n\u003cstem\u003e-YYYYMMDDTHHMMSS-qbak[-N].\u003cext\u003e\n```\n\n- **ISO-8601 timestamp** (basic format, sortable, Windows-safe)\n- **Original extension preserved** so applications recognize file type\n- **Collision counter** (`-1`, `-2`, etc.) if backup with same timestamp exists\n\nExamples:\n- `report.pdf` → `report-20250603T145231-qbak.pdf`\n- `data.tar.gz` → `data.tar-20250603T145231-qbak.gz`\n- `makefile` → `makefile-20250603T145231-qbak`\n\n## Configuration\n\nOptional configuration file: `~/.config/qbak/config.ini`\n\n```ini\n[qbak]\n# Timestamp format for backup names (ISO-8601 basic format)\ntimestamp_format = YYYYMMDDTHHMMSS\n\n# Suffix added to backup filenames  \nbackup_suffix = qbak\n\n# Preserve original file permissions and timestamps (true/false)\npreserve_permissions = true\n\n# Follow symbolic links (copy target) or preserve as symlinks\nfollow_symlinks = true\n\n# Include hidden files when backing up directories  \ninclude_hidden = true\n\n# Maximum filename length before showing error (filesystem limit: 255)\nmax_filename_length = 255\n\n# Progress indication settings\n[progress]\n# Enable/disable progress indication (true/false)\nenabled = true\n\n# Force progress indication regardless of thresholds (true/false)  \nforce_enabled = false\n\n# Minimum number of files to show progress\nmin_files_threshold = 50\n\n# Minimum total size to show progress (in bytes)\nmin_size_threshold = 10485760  # 10 MB\n\n# Minimum expected duration to show progress (in seconds)\nmin_duration_threshold = 2\n```\n\n## Safety Features\n\n- **Never overwrites existing files** - uses collision counters instead\n- **Atomic operations** - temporary files ensure no partial backups\n- **Input validation** - rejects dangerous paths and filenames\n- **Permission preservation** - maintains original file permissions and timestamps\n- **Error recovery** - continues with other files if one fails\n\n## Target Audience\n\n- Linux system administrators\n- Server operators  \n- DevOps engineers\n- Command-line power users\n- Automation scripts\n\n## Platform Support\n\n- **Linux** (primary target)\n- **macOS** \n- **Windows** (via WSL)\n\n## Development\n\n### Building\n\n```bash\ngit clone https://github.com/andreas-glaser/qbak.git\ncd qbak\ncargo build\n```\n\n### Testing\n\n```bash\ncargo test -- --test-threads=1\n```\n\nThe project has comprehensive unit tests covering all modules and edge cases.\n\n### Release Build\n\n```bash\ncargo build --release\n```\n\nThis creates an optimized binary at `target/release/qbak` (~849KB).\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file.\n\n## Author\n\nAndreas Glaser \u003candreas.glaser@pm.me\u003e\n\n## Contributing\n\nContributions welcome! Please feel free to submit issues and pull requests.\n\n**Development Branch**: Active development happens on the `dev` branch. Please submit pull requests against `dev` rather than `main`. See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for detailed release notes and version history. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreas-glaser%2Fqbak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreas-glaser%2Fqbak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreas-glaser%2Fqbak/lists"}