# Zerobyte - Backup automation for self-hosters

As more people run their own homelab, Docker stacks, and self-hosted services, having a **reliable, automated, and simple backup system** becomes essential. **Zerobyte** was created precisely to solve that problem.

%[https://github.com/nicotsx/zerobyte] 

Zerobyte is a lightweight backup automation framework designed specifically for **self-hosters**. It focuses on:

* Automated backup workflows
    
* Easy integration with Docker and bare-metal setups
    
* Snapshot-style versioned backups
    
* Compatibility with Linux servers and cloud storage
    
* A built-in terminal-based UI for monitoring backups
    

Built using POSIX-compatible shell scripts, Zerobyte runs virtually anywhere.

---

## 🎯 **1\. Purpose of Zerobyte**

Zerobyte aims to provide a backup solution that is:

* **Lightweight** – just shell scripts, with minimal dependencies
    
* **Fast** – optimized for quick backup and restore operations
    
* **Secure** – supports versioning and snapshot integrity
    
* **Automated** – cron-ready with built-in scheduling commands
    
* **Extendable** – anyone can write plugins for new apps or services
    

For homelab enthusiasts and self-hosted environments, it is a clean, practical solution.

---

## ⚙️ **2\. Installation**

Installing Zerobyte is straightforward:

```apache
git clone https://github.com/nicotsx/zerobyte.git
cd zerobyte
./install.sh
```

After installation, you gain access to:

* `zb` – the main command-line tool
    
* Plugin directory structure
    
* Configuration templates
    
* Automation scripts
    

---

## 📦 **3\. How Zerobyte Works**

Zerobyte operates using a **plugin-based** architecture.  
Each backup target (e.g., MySQL, folders, Docker volumes) is represented as a plugin:

```apache
backup.sh
restore.sh
config
```

This architecture allows Zerobyte to support:

* Application backups
    
* File system backups
    
* Databases
    
* Docker data folders
    
* Directory-level snapshots
    
* Cloud upload targets
    

Additional features include:

* **Versioning** – keep multiple versions per backup
    
* **Retention policies** – auto cleanup of older snapshots
    
* **Scheduling** – via cron or Zerobyte scheduler
    

---

## 🧩 **4\. Creating New Backup Plugins**

Creating plugins is extremely simple.

Generate a new plugin:

```apache
zb plugin new myapp
```

A minimal plugin example:

[**backup.sh**](http://backup.sh)

```apache
backup() {
    tar -czf "$BACKUP_DIR/myapp.tar.gz" /var/lib/myapp
}
```

[**restore.sh**](http://restore.sh)

```apache
restore() {
    tar -xzf "$1" -C /
}
```

Because everything is pure bash, customizing behavior is effortless.

---

## 🖥️ **5\. Terminal UI – Monitoring Your Backups**

Zerobyte includes a TUI (Terminal User Interface) allowing users to:

* Browse all available backups
    
* Check each plugin’s status
    
* View timestamped snapshots
    
* Trigger manual backups
    
* Inspect logs
    

A typical TUI view may show:

```apache
Name: MySQL
Status: OK
Backup versions:
 - 2025-11-15
 - 2025-11-16
```

This makes management convenient even without a web interface.

---

## 🧪 **6\. Backup Verification**

One of Zerobyte’s strengths is built-in verification:

```apache
zb verify mysql
```

Verification includes:

* File integrity checks
    
* CRC testing
    
* Ensuring restore scripts run properly
    
* Content extraction validation
    

This guarantees that backups are not only created but *reliable*.

---

## 🔁 **7\. Automated Scheduling with Cron**

Scheduling backup jobs is simple.

Built-in scheduler:

```apache
zb schedule daily mysql
zb schedule hourly nextcloud
```

Or add custom jobs manually:

```apache
0 3 * * * zb backup all
```

---

## 🚀 **8\. Creating a New Backup Job**

You can create structured backup jobs:

```apache
zb job new
```

Example configuration:

```apache
name: mysql-nightly
plugins:
  - mysql
schedule: daily
retention: 14 versions
```

Zerobyte handles:

* Running the schedule
    
* Versioning
    
* Automatic old-backup pruning
    

---

## 🌐 **9\. Cloud & Remote Backup Support**

Zerobyte supports various remote targets:

* S3-compatible storage
    
* Wasabi
    
* Backblaze B2
    
* FTP / SFTP
    
* SSH + rsync
    

Example:

```apache
zb remote add myb2 s3 b2://bucket-name
zb backup mysql --upload myb2
```

This allows safe off-site backups following the 3-2-1 backup rule.

---

## 🧰 **10\. Render Plugin – Creating Backup Reports**

Zerobyte can generate human-readable reports:

```apache
zb render html > report.html
```

Useful for:

* Email summaries
    
* Backup dashboards
    
* Archiving status reports
    

---

## 📃 **11\. License & Contribution**

Zerobyte is **open-source** (MIT License).  
Users are encouraged to:

* Fork the project
    
* Submit pull requests
    
* Create new plugins
    
* Report issues or improvements
    

The project is community-friendly and fully transparent.

---

# ✅ **Conclusion**

**Zerobyte** is an impressive, flexible, and lightweight backup automation framework for self-hosters:

✨ Lightweight shell-based design  
✨ Easy plugin-based architecture  
✨ Versioned backups  
✨ Cloud upload support  
✨ Cron scheduling  
✨ Built-in terminal UI  
✨ Verification for trustworthy restores

If you're running a homelab, Docker stack, or VPS, Zerobyte is an excellent tool to ensure your data remains safe, recoverable, and well-organized.

---

If you want, I can also create:

📌 A shorter social-media post  
📌 A more technical documentation-style article  
📌 A comparison with other backup tools (Duplicati, Restic, Borg)  
📌 A beginner-friendly guide with step-by-step examples

Would you like any of these?
