rustic
Backup and restore data using snapshots
TLDR
Initialize a new repository
Create a new backup of a file/directory to a repository
SYNOPSIS
rustic command [options] [arguments]
Common commands include:
rustic init [options]
rustic check [options]
rustic cat type id [options]
rustic prune [options]
rustic ls [options]
rustic stats [options]
PARAMETERS
--repo path
Specifies the path to the repository, overriding environment variables.
--password-file file
Reads the repository password from the specified file.
--password-command cmd
Executes the specified command to get the repository password from its standard output.
--no-lock
Disables repository locking. Use with extreme caution as it can lead to data corruption if multiple processes access the repository concurrently.
--json
Outputs information in JSON format where applicable, suitable for programmatic parsing.
--log-level level
Sets the logging verbosity. Possible levels include error, warn, info, debug, and trace.
--version
Displays the program version and exits.
--help
Shows a help message for the command or specified subcommand.
DESCRIPTION
rustic is a command-line utility written in Rust, designed to interact with repositories created by the restic backup program. It serves as an alternative backend implementation, offering restic-compatible functionality for managing backup data.
While restic handles the actual backup process (creating snapshots, saving files), rustic focuses on operations directly on the repository structure. This includes tasks such as initializing new repositories, listing contents, verifying data integrity, and performing maintenance tasks like pruning old snapshots.
Its development in Rust aims for memory safety and performance. It's often used by users who prefer a Rust-based toolchain or for specific use cases where its features align better. It emphasizes strong compatibility with the restic repository format, allowing users to interchangeably use restic and rustic for repository operations.
CAVEATS
rustic is not a full replacement for restic; it specifically handles repository operations, not the local file system backup/restore process.
While aiming for restic compatibility, slight differences or new restic features might not be immediately supported by rustic.
Improper use of options like --no-lock can lead to repository corruption.
REPOSITORY FORMAT COMPATIBILITY
rustic is designed to be fully compatible with the restic repository format. This means a repository initialized with restic can be managed by rustic, and vice-versa, allowing for flexible usage depending on user preference or specific needs.
ARCHITECTURAL FOCUS
Unlike restic, rustic does not implement the client-side snapshotting logic (e.g., reading files from disk, creating new snapshots). Instead, its functionality is strictly focused on backend-side operations: storing, retrieving, and managing data chunks and metadata within the existing restic repository structure.
HISTORY
rustic was developed as an independent project to provide a Rust-based implementation of restic's backend logic. Its development began after restic gained popularity, with the goal of leveraging Rust's memory safety and performance guarantees. It fills a niche for users who prefer a Rust-native solution for repository maintenance, focusing on core compatibility and essential repository operations.
SEE ALSO
restic(1)