Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtlynch/zfs-encrypted-backup
https://github.com/mtlynch/zfs-encrypted-backup
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mtlynch/zfs-encrypted-backup
- Owner: mtlynch
- License: unlicense
- Created: 2022-07-04T22:28:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-20T00:42:27.000Z (9 months ago)
- Last Synced: 2024-02-20T23:35:47.567Z (9 months ago)
- Language: Shell
- Size: 30.3 KB
- Stars: 18
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zfs-encrypted-backup
[![CircleCI](https://circleci.com/gh/mtlynch/zfs-encrypted-backup.svg?style=svg)](https://circleci.com/gh/mtlynch/zfs-encrypted-backup)
[![License](https://img.shields.io/badge/license-Unlicense-blue)](LICENSE)## Overview
Example scripts to demonstrate how to back up encrypted ZFS backups to an unencrypted dataset.
## Setup
1. Copy `.env.example` to `.env`
1. Customize the values in `.env` according to your system.## Perform a full backup
To perform a full backup of your dataset snapshots, run the following script:
```bash
./replicate-full-snapshots
```You'll likely want to run this as a cron job weekly or monthly.
## Perform an incremental backup
To perform incremental backups relative to your latest full backups (above), run the following command:
```bash
./replicate-incremental-snapshots
```You'll likely want to run this as a cron job daily or weekly.
## Restore from backup
To recover from an encrypted dataset backup, run the following script:
```bash
./snapshot-to-dataset \
new-dataset-name \
full-snapshot-path \
[incremental-snapshot-path]
```For example, if you were recovering a dataset from encrypted and incremental backup files, you'd run the following:
```bash
./snapshot-to-dataset \
documents-recovered \
/mnt/pool1/secure-backups/full-snapshots/documents@manual-2022-07-02_22-18 \
/mnt/pool1/secure-backups/incremental-snapshots/documents@auto-2022-07-05_00-00
```