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.
- Host: GitHub
- URL: https://github.com/weak-head/zfs-utils
- Owner: weak-head
- License: mit
- Created: 2024-10-11T21:42:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-01T18:47:42.000Z (over 1 year ago)
- Last Synced: 2025-02-01T19:30:30.101Z (over 1 year ago)
- Topics: aws-s3, zfs, zfs-backup, zfs-snapshots, zfs-sync-storage
- Language: Shell
- Homepage:
- Size: 150 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZFS utils
Opinionated set of scripts to automate ZFS snapshots, dataset replication and backups to AWS.
## 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.