com um clique
e2e-tests
// End-to-end validation suite for vykar backup tool on a Linux sandbox server
// End-to-end validation suite for vykar backup tool on a Linux sandbox server
Cut a new vykar release: bump versions, tag, push, wait for CI, and draft release notes.
Review Rust codebases for performance anti-patterns, with emphasis on async runtimes, client-server networking, memory allocation, serialization, and concurrency. Use when asked to audit, review, or optimize Rust code for performance.
Review and improve Rust application architecture for large CLI and backup systems, including workspace layout, crate boundaries, error handling, async/sync design, and testing strategy.
Security review skill for the vykar backup tool (Rust). Use when reviewing code for security issues, auditing cryptographic implementations, checking for credential leaks, reviewing unsafe code, or validating the security model of the backup tool. Covers encryption, key management, repository integrity, hook execution, config parsing, dependency auditing, and backup-specific attack surfaces.
| name | e2e-tests |
| description | End-to-end validation suite for vykar backup tool on a Linux sandbox server |
You are a Linux sysadmin testing vykar on a dedicated sandbox server. Your goal is to validate backup and restore correctness across all supported backends, database integrations, container workflows, filesystem snapshot patterns, and performance benchmarks.
Work autonomously. This is a disposable sandbox — do not ask for permission or confirmation before running commands, installing packages, creating/deleting files, or making destructive changes. If something fails, diagnose and fix it yourself. Only stop to ask the user if you are completely stuck with no viable path forward.
The test server provides:
| Resource | Path | Purpose |
|---|---|---|
| Large corpus | ~/corpus-local | Test data for local backend (large) |
| Small corpus | ~/corpus-remote | Test data for S3/SFTP/REST backends (bandwidth-aware) |
| Base config | ~/vykar.sample.yaml | Repo definitions, credentials, and connection details |
| Vykar docs | https://vykar.borgbase.com/ | Recipe reference for hooks, command_dumps, etc. |
Installed tools: vykar, vykar-server, rclone, docker, podman, database clients (pg, mariadb, mongo).
Install missing packages with sudo apt-get install ....
Run each sub-skill to execute a specific test area. Results go to ~/runtime/.
e2e-tests:backends:local — Full backup/restore with large corpus on local backende2e-tests:backends:local-none — Full backup/restore with large corpus on local backend using encryption.mode: nonee2e-tests:backends:rest — Backup/restore against local vykar-server REST backende2e-tests:backends:s3 — Backup/restore with small corpus on S3 backende2e-tests:backends:sftp — Backup/restore with small corpus on SFTP backend (timeout-bounded)e2e-tests:backends:interrupt-minimal — Interrupt backup mid-run and verify resume + restore integrity across local, rest, s3 (local MinIO), and sftpe2e-tests:databases:postgres — PostgreSQL with hooks dump and command_dumps variants on ~10 GiB randomized schemae2e-tests:databases:mariadb — MariaDB with hooks dump and command_dumps variants on ~10 GiB randomized schemae2e-tests:databases:mongodb — MongoDB with command_dumps (mongodump --archive) on ~2.5 GiB randomized collectionse2e-tests:containers:docker — Static volumes, downtime hooks, DB exec dumps via Dockere2e-tests:containers:podman — Same scenarios using Podman commandse2e-tests:filesystems:btrfs — Btrfs read-only subvolume snapshot hookse2e-tests:filesystems:zfs — ZFS dataset snapshot hooks via .zfs/snapshot pathe2e-tests:filesystems:vm-image — Ubuntu cloud image mutate+backup dedupe validation via guestmount/chroote2e-tests:benchmarks — Compare vykar performance against restic and rustic (use benchmarks.md + bundled scripts under scripts/)e2e-tests:stress — Run long-loop backup/restore/delete stress validation against local corpus (use stress.md + scripts/stress.sh)export VYKAR_PASSPHRASE=123 # non-interactive passphrase
sudo for package installs and root-owned paths~/runtime/scripts/postgres-generate-random-data.sh --container <name> --target-gib 10scripts/mariadb-generate-random-data.sh --container <name> --target-gib 10scripts/mongodb-generate-random-data.sh --container <name> --target-gib 2.5e2e-tests:filesystems:vm-image, prefer large package mutations by default (not tiny smoke installs).ubuntu-desktop-minimal (primary).ubuntu-desktop.apt-get install -y ubuntu-desktop-minimalapt-get install -y --no-install-recommends thunderbird libreoffice-core htop curl jq git~/vykar.sample.yaml to a scenario-specific config (e.g., config.postgres.yaml)sources blocks per scenario; keep repo definitions from sample-R local, -R rest, -R s3, -R sftpencryption.mode: none; treat it as a required backend validation, not an optional smoke teste2e-tests:backends:local-none scenario, set:
encryption.mode: noneencryption.passphrase / VYKAR_PASSPHRASEhttp://127.0.0.1:8585) with:
access_token: "<token>"allow_insecure_http: true/<repo-name> in single-repo modee2e-tests:backends:interrupt-minimal, use a dedicated config file and point S3 to local MinIO:
url: "s3+http://127.0.0.1:9000/vykar-stress/<run-id>"allow_insecure_http: trueregion: "us-east-1"access_key_id: "minioadmin"secret_access_key: "minioadmin"Every test must verify:
vykar backup exits 0vykar list shows new snapshot for expected source labelvykar --config <config> snapshot list -R <repo> <snapshot_id> confirms expected files or artifactsdiff -qr --no-dereference <source> <restore_dir> reports no differencesrm -rf <restore_dir>vykar --config <config> delete -R <repo> --yes-delete-this-repo before init
not found/missing repo as non-fataldelete (for example 400/404); if so, continue with init/backup and record itdiff/integrity checks unless actively debugging/mnt/repos/bench-vykar/vykar-server-data/*)rclone delete --rmdirs <remote:path> between runs
rclone purge (may fail with 403 on restricted buckets)directory not found from rclone as non-fatalFor tests that span multiple backends, run in this order:
SFTP can be intermittent even when rclone works fine against the same server:
timeout: timeout 120s vykar init ..., timeout 3600s vykar backup ...vykar process remains after aborted SFTP stepsRun order:
localrests3 (local MinIO only)sftpSource mapping:
local -> ~/corpus-local/snapshot-1rest -> ~/corpus-remote/snapshot-1s3 (local MinIO) -> ~/corpus-remote/snapshot-1sftp -> ~/corpus-remote/snapshot-1Interrupt method (backup only):
vykar --config <config> backup -R <repo> <src> > <backup_log> 2>&1 &
pid=$!
1-5s, backend-specific), then send SIGTERM:
kill -TERM "$pid"
kill -KILL "$pid"
interrupt_rc).Resume + validation sequence:
sftp, use timeout-bounded commands per SFTP guardrails).snapshot_id from Snapshot created: <id> in resume backup log.vykar --config <config> list -R <repo> --last 5 and confirm snapshot appears.vykar --config <config> snapshot list -R <repo> <snapshot_id>.diff -qr --no-dereference <src> <restore_dir>.vykar --config <config> check -R <repo>.Status rules:
PASS: interrupted backup + resume backup + list/snapshot list/restore/diff/check all succeed.FAIL: non-timeout command failure or diff mismatch.BLOCKED: timeout (rc=124) on timeout-bounded steps.Each sub-skill should produce:
~/runtime/~/runtime/logs/~/runtime/reports/backend,status,reason,interrupt_rc,resume_rc,snapshot_id,log_dir,report_pathsudo vykar and regular vykar creates root-owned repo files — use sudo rm -rf for cleanupvykar-dumps/ in snapshot listingsvykar --config <config> ... in automation; keep --config explicit in all commands--label (or -l) is for ad-hoc backup paths only. If sources/command_dumps are already defined in config, run vykar --config <config> backup -R <repo> without -l.vykar snapshot CLI forms:
vykar --config <config> snapshot list -R <repo> <snapshot_id>vykar --config <config> snapshot delete -R <repo> <snapshot_id>http://127.0.0.1:8585 root URL) and reject path-style reposdiff -qr --no-dereference to avoid false negatives on broken symlinks in corporamariadb, mariadb-dump, mariadb-admin (not mysql* names)docker exec dumps, prefer socket protocol with retries; in-container TCP to 127.0.0.1 can be intermittently unreliable on this sandboxscripts/postgres-generate-random-data.sh --container <name> --target-gib <N>scripts/mariadb-generate-random-data.sh --container <name> --target-gib <N>scripts/mongodb-generate-random-data.sh --container <name> --target-gib <N>.zfs directory/dev, /proc, /sys, and /run before apt operationsubuntu-desktop-minimal as the default large package mutation targetdocker exec or podman exec as fallbackinterrupt_rc=0 usually means the backup finished before the signal landed. Re-run with shorter sle