$ show BretFisher/docker-vackup
Vackup is a standalone bash script CLI tool for backing up and restoring Docker volumes. It provides four core commands: export (volume to tarball), import (tarball to volume), save (volume to Docker image), and load (Docker image to volume). The tool runs temporary busybox containers to perform file operations, ensuring compatibility across Linux and macOS. It features robust error handling with user-definable failure hooks, cross-platform path resolution, and a comprehensive Bats test suite. The tool is designed to be run from any host with Docker CLI access, with optional Docker image distribution via the provided Dockerfile.
The LLM identified 1 files worth highlighting for reuse:
The vackup script is a self-contained CLI tool implementing the command pattern for Docker volume backup/restore operations. It demonstrates non-obvious craftsmanship in cross-platform path handling (using realpath with fallback to cd/pwd), robust error handling with trap-based error propagation and user-definable failure scripts, and clear subcommand dispatch. The entire script is reusable as a standalone tool in any project requiring Docker volume management, with zero dependencies beyond Docker and busybox.