updated documentation and version

This commit is contained in:
Edwin Eefting 2017-07-26 02:29:45 +02:00
parent b4507bae27
commit 285bace604
2 changed files with 32 additions and 26 deletions

View File

@ -13,6 +13,7 @@ It has the following features:
* "pull" remote data from a server via SSH and backup it locally.
* Backup local data on the same server.
* Can be scheduled via a simple cronjob or run directly from commandline.
* Supports resuming of interrupted transfers. (via the zfs extensible_dataset feature)
* Backups and snapshots can be named to prevent conflicts. (multiple backups from and to the same filesystems are no problem)
* Always creates a new snapshot before starting.
* Checks everything and aborts on errors.
@ -29,12 +30,12 @@ Usage
usage: zfs_autobackup [-h] [--ssh-source SSH_SOURCE] [--ssh-target SSH_TARGET]
[--ssh-cipher SSH_CIPHER] [--keep-source KEEP_SOURCE]
[--keep-target KEEP_TARGET] [--no-snapshot] [--no-send]
[--destroy-stale] [--clear-refreservation]
[--clear-mountpoint] [--rollback] [--compress] [--test]
[--verbose] [--debug]
[--resume] [--strip-path STRIP_PATH] [--destroy-stale]
[--clear-refreservation] [--clear-mountpoint]
[--rollback] [--compress] [--test] [--verbose] [--debug]
backup_name target_fs
ZFS autobackup v2.0
ZFS autobackup v2.1
positional arguments:
backup_name Name of the backup (you should set the zfs property
@ -51,7 +52,7 @@ optional arguments:
Target host to push backup to. (user@hostname) Default
local.
--ssh-cipher SSH_CIPHER
SSH cipher to use (default arcfour128)
SSH cipher to use (default None)
--keep-source KEEP_SOURCE
Number of days to keep old snapshots on source.
Default 30.
@ -61,13 +62,21 @@ optional arguments:
--no-snapshot dont create new snapshot (usefull for finishing
uncompleted backups, or cleanups)
--no-send dont send snapshots (usefull to only do a cleanup)
--resume support resuming of interrupted transfers by using the
zfs extensible_dataset feature (both zpools should
have it enabled)
--strip-path STRIP_PATH
number of directory to strip from path (use 1 when
cloning zones between 2 SmartOS machines)
--destroy-stale Destroy stale backups that have no more snapshots. Be
sure to verify the output before using this!
--clear-refreservation
Set refreservation property to none for new
filesystems. Usefull when backupping SmartOS volumes.
--clear-mountpoint Clear mountpoint property, to prevent the received
(recommended)
--clear-mountpoint Sets canmount=noauto property, to prevent the received
filesystem from mounting over existing filesystems.
(recommended)
--rollback Rollback changes on the target before starting a
backup. (normally you can prevent changes by setting
the readonly property on the target_fs to on)
@ -76,9 +85,6 @@ optional arguments:
(still does all read-only operations)
--verbose verbose output
--debug debug output (shows commands that are executed)
```
Backup example

View File

@ -606,7 +606,7 @@ def zfs_autobackup():
# parse arguments
import argparse
parser = argparse.ArgumentParser(description='ZFS autobackup v2.0')
parser = argparse.ArgumentParser(description='ZFS autobackup v2.1')
parser.add_argument('--ssh-source', default="local", help='Source host to get backup from. (user@hostname) Default %(default)s.')
parser.add_argument('--ssh-target', default="local", help='Target host to push backup to. (user@hostname) Default %(default)s.')
parser.add_argument('--ssh-cipher', default=None, help='SSH cipher to use (default %(default)s)')