Commit Graph

15 Commits

Author SHA1 Message Date
Kevin McCormick
aafb241393 ssh mode: zfsfind should not specify a path 2017-03-10 10:10:57 -08:00
Kevin McCormick
720754a504 ssh mode: use forced backup-zfs-shell
Ensure the backup connection to the SSH server can't do anything other
than designed. Uses ssh's authorized_keys command= statement to launch
backup-zfs-shell, which then supports only the handful of operations
required to perform backups.

$destpath is no longer used, but still included in the documentation
until it can be entirely written out.
2017-03-09 12:08:50 -08:00
Kevin McCormick
afb2b924ba ssh mode: fix last snapshot tracking 2017-03-07 15:28:21 -08:00
Kevin McCormick
28c7cbc747 ssh mode: add gpg encryption support 2017-03-07 15:28:21 -08:00
Kevin McCormick
3bb83e8029 ssh mode: stage snapshots on ssh server
Turn backup-zfs into a two-step process:
1. Send snapshots to a server over SSH
2. Receive those snapshots over SSH

Supports a disconnected backup environment where the backup storage host
and the system being backed up don't have to be online at the same time.

Use case: Send snapshots from my home server to my work server while I'm
asleep, then read them over the LAN from my work server to my external
drive while I'm at work.
2017-03-07 15:24:22 -08:00
Kevin McCormick
6d906ad640 When verbose, make zfs send/recv verbose as well 2016-10-10 09:56:22 -07:00
Kevin McCormick
cf353fafd4 Allow matching any snapshot between src & dest
Previously we looked for the specific tagged snapshot, but that doesn't
actually work properly. Now simply find the most recent snapshot on dest
and compare to src. It must exist on src.
2016-09-16 16:10:33 -07:00
Kevin McCormick
0850e82df3 exit on failure of critical zfs commands
Execution should not continue upon failure of certain zfs commands. In
particular, cleanup/rotation of the oldest snapshots will no longer
occur upon a failure to send/receive.
2016-09-12 11:39:29 -07:00
Kevin McCormick
12f7666a2f fail early if destination fs doesn't exist
zfs receive will fail, but the source snapshot has already been created,
and the rotation/cleanup of old snapshots will be triggered
2016-09-12 11:28:48 -07:00
Kevin McCormick
481212e5e6 Improve usage statement 2016-08-04 16:29:28 -07:00
Kevin McCormick
f2b40a2ce8 save only last component of src fs in dest
Change zfs receive command to use -e (was -d).

Allow greater control of dest placement. srcpool/a/really/long/path
should not force me to deal with destpool/backupdest/a/really/long/path.
2016-08-04 16:26:07 -07:00
Kevin McCormick
473e51d89c split snapshot/syslog "tag" to independent values 2016-08-04 16:24:08 -07:00
Kevin McCormick
2eb6a5644e change dateformat to more generic date options
Allow switching to UTC or any other full control of date(1)
2016-08-04 16:23:02 -07:00
Kevin McCormick
c7dc56255e add quiet mode 2016-08-04 15:02:33 -07:00
Kevin McCormick
c6a82a7ccd Import scripts
* supports either local or remote usage
* always uses sudo
* getopts for a few settings
* keeps its own snapshots for send/recv purposes, independent of others
2016-08-04 15:01:54 -07:00