updated documentation and version
This commit is contained in:
24
README.md
24
README.md
@ -13,6 +13,7 @@ It has the following features:
|
|||||||
* "pull" remote data from a server via SSH and backup it locally.
|
* "pull" remote data from a server via SSH and backup it locally.
|
||||||
* Backup local data on the same server.
|
* Backup local data on the same server.
|
||||||
* Can be scheduled via a simple cronjob or run directly from commandline.
|
* 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)
|
* 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.
|
* Always creates a new snapshot before starting.
|
||||||
* Checks everything and aborts on errors.
|
* Checks everything and aborts on errors.
|
||||||
@ -29,12 +30,12 @@ Usage
|
|||||||
usage: zfs_autobackup [-h] [--ssh-source SSH_SOURCE] [--ssh-target SSH_TARGET]
|
usage: zfs_autobackup [-h] [--ssh-source SSH_SOURCE] [--ssh-target SSH_TARGET]
|
||||||
[--ssh-cipher SSH_CIPHER] [--keep-source KEEP_SOURCE]
|
[--ssh-cipher SSH_CIPHER] [--keep-source KEEP_SOURCE]
|
||||||
[--keep-target KEEP_TARGET] [--no-snapshot] [--no-send]
|
[--keep-target KEEP_TARGET] [--no-snapshot] [--no-send]
|
||||||
[--destroy-stale] [--clear-refreservation]
|
[--resume] [--strip-path STRIP_PATH] [--destroy-stale]
|
||||||
[--clear-mountpoint] [--rollback] [--compress] [--test]
|
[--clear-refreservation] [--clear-mountpoint]
|
||||||
[--verbose] [--debug]
|
[--rollback] [--compress] [--test] [--verbose] [--debug]
|
||||||
backup_name target_fs
|
backup_name target_fs
|
||||||
|
|
||||||
ZFS autobackup v2.0
|
ZFS autobackup v2.1
|
||||||
|
|
||||||
positional arguments:
|
positional arguments:
|
||||||
backup_name Name of the backup (you should set the zfs property
|
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
|
Target host to push backup to. (user@hostname) Default
|
||||||
local.
|
local.
|
||||||
--ssh-cipher SSH_CIPHER
|
--ssh-cipher SSH_CIPHER
|
||||||
SSH cipher to use (default arcfour128)
|
SSH cipher to use (default None)
|
||||||
--keep-source KEEP_SOURCE
|
--keep-source KEEP_SOURCE
|
||||||
Number of days to keep old snapshots on source.
|
Number of days to keep old snapshots on source.
|
||||||
Default 30.
|
Default 30.
|
||||||
@ -61,13 +62,21 @@ optional arguments:
|
|||||||
--no-snapshot dont create new snapshot (usefull for finishing
|
--no-snapshot dont create new snapshot (usefull for finishing
|
||||||
uncompleted backups, or cleanups)
|
uncompleted backups, or cleanups)
|
||||||
--no-send dont send snapshots (usefull to only do a cleanup)
|
--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
|
--destroy-stale Destroy stale backups that have no more snapshots. Be
|
||||||
sure to verify the output before using this!
|
sure to verify the output before using this!
|
||||||
--clear-refreservation
|
--clear-refreservation
|
||||||
Set refreservation property to none for new
|
Set refreservation property to none for new
|
||||||
filesystems. Usefull when backupping SmartOS volumes.
|
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.
|
filesystem from mounting over existing filesystems.
|
||||||
|
(recommended)
|
||||||
--rollback Rollback changes on the target before starting a
|
--rollback Rollback changes on the target before starting a
|
||||||
backup. (normally you can prevent changes by setting
|
backup. (normally you can prevent changes by setting
|
||||||
the readonly property on the target_fs to on)
|
the readonly property on the target_fs to on)
|
||||||
@ -76,9 +85,6 @@ optional arguments:
|
|||||||
(still does all read-only operations)
|
(still does all read-only operations)
|
||||||
--verbose verbose output
|
--verbose verbose output
|
||||||
--debug debug output (shows commands that are executed)
|
--debug debug output (shows commands that are executed)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Backup example
|
Backup example
|
||||||
|
|||||||
@ -606,7 +606,7 @@ def zfs_autobackup():
|
|||||||
|
|
||||||
# parse arguments
|
# parse arguments
|
||||||
import argparse
|
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-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-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)')
|
parser.add_argument('--ssh-cipher', default=None, help='SSH cipher to use (default %(default)s)')
|
||||||
|
|||||||
Reference in New Issue
Block a user