https://github.com/deajan/zsnap
Snapshot management script for ZFS on linux, samba vfs object friendly naming (previous versions under Windows). Keep a given number of snapshots, create new ones as scheduled cron task, and have email alerts on errors.
https://github.com/deajan/zsnap
Last synced: 15 days ago
JSON representation
Snapshot management script for ZFS on linux, samba vfs object friendly naming (previous versions under Windows). Keep a given number of snapshots, create new ones as scheduled cron task, and have email alerts on errors.
- Host: GitHub
- URL: https://github.com/deajan/zsnap
- Owner: deajan
- Created: 2013-06-15T10:37:54.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-05-09T09:29:27.000Z (almost 9 years ago)
- Last Synced: 2025-04-12T21:42:31.118Z (15 days ago)
- Language: Shell
- Size: 43.9 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
zsnap
=====## About
Znsap script handles ZFS on linux snapshot functionnality, creates and handles a defined number of snapshots in Samba VFS friendly format (Windows previous versions support).
It will send an alert mail if any snapshot related functionnality creates an error.## Installation
You can download the latest stable version of znsap directly on authors website or grab the latest working copy on git.
$ git://github.com/deajan/zsnap.git
$ chmod +x zsnap.shAdditionnaly, you may copy zsnap.sh to /usr/local/bin
$ cp zsnap.sh /usr/local/bin
Once you have a copy of Zsnap, edit the configuration file to match your needs and you're ready to run.## Usage
$ zsnap.sh /path/to/your.conf status
$ zsnap.sh /path/to/your.conf createYou may run multiple instances of zsnap by creating mutliple configuration files, one per dataset.
You can easily add zsnap as cron task which will take snapshots at a given time. Use parameter --silent to prevent writing to stdout for crontasks.$ ./zsnap.sh /path/to/your.conf create --silent
The number of kept snapshots is handled by zsnap, but you may also control it's behaviour manually by using the following commands:
$ ./zsnap.sh /path/to/dataset.conf destroyoldest
$ ./zsnap.sh /another/path/other_dataset.conf destroyallYou may increase output level of zsnap script by adding parameter --verbose to see what is actually going on
$ ./zsnap.sh /my/conf/files/my.conf create --verbose
Zsnap will mount every snapshot in Samba's VFS object shadow_copy friendly format. Keep in mind that samba's VFS object only works if you share the root of your ZFS dataset or subdataset.
## Author
Orsiris "Ozy" de Jong
[email protected]