Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KireinaHoro/zfs-auto-backup
Automatically backup ZFS snapshots to backup pool
https://github.com/KireinaHoro/zfs-auto-backup
Last synced: 2 months ago
JSON representation
Automatically backup ZFS snapshots to backup pool
- Host: GitHub
- URL: https://github.com/KireinaHoro/zfs-auto-backup
- Owner: KireinaHoro
- License: gpl-3.0
- Created: 2018-02-26T01:45:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-05T02:28:41.000Z (almost 7 years ago)
- Last Synced: 2024-08-03T01:39:25.676Z (6 months ago)
- Language: Shell
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zfs-auto-backup
`zfs-auto-backup` automatically backs up your local ZFS snapshots to another pool via
`zfs send | zfs recv`. This tool is recommended to be used together with `zfs-auto-snapshot`,
which can be found [here](https://github.com/zfsonlinux/zfs-auto-snapshot).Designed for ease of configuration, this tool reads data from zfs properties documented below.
```bash
usage() {
echo -n "
Usage: $0 : run backup on all datasets configured for zfs-auto-backup
$0 help : display this messagezfs-auto-backup automatically transfers local zfs snapshots that match the given criteria
to the configured alternative pool (via zfs send | zfs recv), set via \"org.jsteward:auto-backup*\"
zfs property keys. The following keys are used:# marks whether snapshots of this dataset are candidates for backup to external disk
org.jsteward:auto-backup = ( false | true )
# marks the destination to send the snapshots to (parent of the backups that will be stored in)
org.jsteward:auto-backup-dest = [ parent path ]
# marks the tag of the snapshots to send
org.jsteward:auto-backup-tag = [ tag name ]Additionally, \"org.jsteward:auto-backup-origin\" will be set for the destination dataset, denoting
the full name which the backup came from, which may help when restoring the backup."
exit 127
}
```## Configuration
`zfs-auto-backup` has some variables available for overriding upon calling:
- `DEBUG` controls whether debug messages will be printed or not. (default: `1`)
- `DRY_RUN` controls whether real actions will be performed or simply printing out what will be done. (default: `0`)
- `PREFIX` specifies prefixes in snapshot naming scheme (default: `znap` , as in `@znap_2018-01-01-0000_hourly`)
- `OVERRIDE_TARGET` specifies whether the destination should be overrided when conflicts while receiving occursThey can be set in your environment, or overrided on the commandline like this:
```bash
DRY_RUN=1 ./zfs-auto-backup
```## Platform compatibility
This tool is a bash script tested on `GNU bash, version 4.4.19(1)-release (x86_64-unknown-linux-gnu)`.
More tests on other shells are welcomed.## License
zfs-auto-backup is licensed under GPL-3.0. The full license text is available in the repository root, named LICENSE .
## Donations
If you find this work helpful, consider buying me a glass of beer :) Accepted payment methods listed below:
- PayPal: [email protected]
- BTC: 13jTGFvjh7DAwiHZzxpaiqfehVnX2CWncC