Skip to main content

Fast, Encrypted, Deduplicated Backups

Build powerful backup solutions with Rustic Core—a Rust library that combines speed, security, and efficiency for production-grade backup systems.

Quick Start

Get up and running with Rustic Core in just a few steps.

1

Add Rustic Core to your project

Add the dependency to your Cargo.toml file:
[dependencies]
rustic_core = "0"
rustic_backend = "0"
Use version “0” to always get the latest compatible version.
2

Initialize a repository

Create and initialize a new backup repository:
use rustic_backend::BackendOptions;
use rustic_core::{ConfigOptions, KeyOptions, Repository, RepositoryOptions};

// Set up backend
let backends = BackendOptions::default()
    .repository("/tmp/my-backup")
    .to_backends()?;

// Initialize with password
let repo_opts = RepositoryOptions::default().password("my-secure-password");
let repo = Repository::new(&repo_opts, &backends)?
    .init(&KeyOptions::default(), &ConfigOptions::default())?;
Repositories are encrypted by default using AES-256 with Poly1305 authentication.
3

Create your first backup

Back up a directory to your repository:
use rustic_core::{BackupOptions, PathList, SnapshotOptions};

// Open repository and prepare for backup
let repo = Repository::new(&repo_opts, &backends)?
    .open()?
    .to_indexed_ids()?;

// Configure backup
let source = PathList::from_string("./my-data")?.sanitize()?;
let snap = SnapshotOptions::default()
    .add_tags("production,daily")?
    .to_snapshot()?;

// Run backup
let snapshot = repo.backup(&BackupOptions::default(), &source, snap)?;
println!("Backup complete! Snapshot ID: {}", snapshot.id);
Learn more in the Backup Guide.

Core Features

Everything you need to build production-ready backup solutions.

Content-Defined Chunking

Efficient deduplication using CDC algorithms reduces storage requirements by 60-95%.

AES-256 Encryption

Military-grade encryption with Poly1305 authentication ensures your data stays secure.

Restic Compatible

Read and write restic repository format—interoperable with the restic ecosystem.

Multiple Backends

Support for local, S3, REST, rclone, and 20+ cloud storage providers.

Fast Performance

Parallel processing and optimized algorithms deliver high-speed backups and restores.

Repository Maintenance

Built-in check, prune, and repair operations keep repositories healthy.

Explore by Topic

Dive deeper into specific areas of Rustic Core.

Core Concepts

Understand repositories, snapshots, encryption, and deduplication fundamentals.

Guides

Step-by-step instructions for backup, restore, and repository management.

Examples

Real-world code examples showing common use cases and patterns.

API Reference

Complete API documentation for all types, methods, and options.

Community & Support

Get help and connect with other Rustic users.

GitHub Discussions

Ask questions, share ideas, and discuss features with the community.

Discord Community

Join our Discord server for real-time chat and support.

Issue Tracker

Report bugs and request features on GitHub.

Contributing Guide

Learn how to contribute code, documentation, and improvements.

Ready to Build Your Backup Solution?

Start building with Rustic Core today and leverage the power of encrypted, deduplicated backups in your Rust applications.

Get Started Now