An open API service indexing awesome lists of open source software.

https://github.com/weak-head/zfs-utils

Opinionated set of scripts to automate ZFS snapshots, dataset replication and backups to AWS.
https://github.com/weak-head/zfs-utils

aws-s3 zfs zfs-backup zfs-snapshots zfs-sync-storage

Last synced: about 1 year ago
JSON representation

Opinionated set of scripts to automate ZFS snapshots, dataset replication and backups to AWS.

Awesome Lists containing this project

README

          



# ZFS utils

Opinionated set of scripts to automate ZFS snapshots, dataset replication and backups to AWS.



lint


GitHub Release


#!/bin/bash


MIT License


## Table of Contents
- [Overview](#overview)
- [Gettings Started](#getting-started)

## Overview

TBD

## Getting Started

This project includes several scripts, each with specific dependencies. The only required dependency for all scripts is `zfs`. Additional dependencies, which depend on the script being used, include `pv`, `aws`, and `jq`.

The scripts' behavior is controlled through ZFS metadata, which determines whether actions like snapshots, replication, or AWS S3 backups should be performed.

| Script | ZFS Metadata Key | Description |
|---------------|--------------------------------|---------------------------------|
| `zfs-snap` | `zfs-utils:auto-snap` | Enables automatic snapshots. |
| `zfs-to-s3` | `zfs-utils:aws-bucket` | Enables AWS S3 backups. |
| `zfs-to-zfs` | `zfs-utils:replication-target` | Enables dataset replication. |

You can configure ZFS metadata using the `zfs set` command. Here are some examples:

```bash
# Enable automatic snapshots for a dataset
zfs set zfs-utils:auto-snap=true odin/services/cloud

# Configure AWS S3 backups for a dataset
zfs set zfs-utils:aws-bucket=backup.bucket.aws odin/services/cloud

# Define a replication target for a dataset
zfs set zfs-utils:replication-target=thor/services/cloud odin/services/cloud
```

To install the scripts, run:

```bash
# This installs the scripts to `/usr/local/sbin/`
make install
```

To view all datasets and their associated metadata, use the `zfs-info` command.