Skip to content

fnb — Fetch'n'Backup

Simple backup tool with rsync

fnb is a command-line tool that simplifies backup workflows by providing a structured approach to data synchronization using rsync. Whether you need to fetch data from remote servers or backup local data to external storage, fnb makes it easy with configuration-driven automation.

Key Features

🔄 Three Transfer Directions

  1. Fetch: Pull data from remote servers to local storage
  2. Backup: Push local data to external/cloud destinations
  3. Upload: Push local data to a remote server
  4. Sync: Run Fetch then Backup in sequence (Upload is invoked on its own)

⚙️ Configuration-Driven

  • TOML-based configuration files
  • Task-based organization
  • Environment variable support
  • Auto-discovery of config files

🔐 SSH Automation

  • Automatic SSH password handling
  • Support for key-based authentication
  • Secure credential management
  • Interactive and non-interactive modes

🛡️ Safe Operations

  • Dry-run mode for all operations
  • Directory existence validation
  • Comprehensive error handling
  • Progress tracking and logging

Quick Start

1. Install fnb

pip install fnb

See the Installation Guide for uv alternatives and running from source.

2. Generate Configuration

fnb init

3. Configure Tasks

Edit the generated fnb.toml file to define your backup tasks:

[fetch.logs]
label = "logs"
summary = "Fetch application logs"
host = "user@server.com"
source = "/var/log/app/"
target = "./backup/logs/"
options = ["-auvz", "--delete"]
enabled = true

[backup.logs]
label = "logs"
summary = "Backup logs to external storage"
host = "none"
source = "./backup/logs/"
target = "/mnt/external/logs/"
options = ["-auvz", "--delete"]
enabled = true

4. Run Backup Operations

# Check configuration
fnb status

# Fetch from remote
fnb fetch logs

# Backup to external storage
fnb backup logs

# Or do both in sequence
fnb sync logs

# Push local data to a remote server
fnb upload logs

Use Cases

🌐 Server Backup

  • Web server content and logs
  • Database dumps and configurations
  • Application data and media files

💼 Personal Data

  • Documents and photos
  • Development projects
  • System configurations

🏢 Enterprise

  • Multi-server infrastructure
  • Compliance and archival
  • Disaster recovery preparation

Why fnb?

  • Simple: Easy configuration with TOML files
  • Reliable: Built on proven rsync technology
  • Flexible: Supports various backup scenarios
  • Secure: SSH automation with credential management — .env, macOS Keychain, GPG-encrypted files, or optional dotenvx encryption for stored passwords
  • Cross-platform: Works on Linux, macOS, and Windows

Get Started

Community & Support


fnb — Making backup workflows simple and reliable.