diff options
author | Tom Caputi <[email protected]> | 2020-01-10 13:16:58 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-01-10 10:16:58 -0800 |
commit | ba0ba69e50efeda7190b59f27c23ada0edf6f36b (patch) | |
tree | 15a28e7c05e9265cd3c54c08c287abdf994ea507 /include/sys | |
parent | 9ab6109fb51c88e9dc43622432b300efed036995 (diff) |
Add 'zfs send --saved' flag
This commit adds the --saved (-S) to the 'zfs send' command.
This flag allows a user to send a partially received dataset,
which can be useful when migrating a backup server to new
hardware. This flag is compatible with resumable receives, so
even if the saved send is interrupted, it can be resumed.
The flag does not require any user / kernel ABI changes or any
new feature flags in the send stream format.
Reviewed-by: Paul Dagnelie <[email protected]>
Reviewed-by: Alek Pinchuk <[email protected]>
Reviewed-by: Paul Zuchowski <[email protected]>
Reviewed-by: Christian Schwarz <[email protected]>
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes #9007
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/dmu_send.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/sys/dmu_send.h b/include/sys/dmu_send.h index 2f3dfc39f..d6d050e01 100644 --- a/include/sys/dmu_send.h +++ b/include/sys/dmu_send.h @@ -51,14 +51,16 @@ struct dmu_send_outparams; int dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok, boolean_t large_block_ok, boolean_t compressok, boolean_t rawok, - uint64_t resumeobj, uint64_t resumeoff, const char *redactbook, int outfd, - offset_t *off, struct dmu_send_outparams *dsop); + boolean_t savedok, uint64_t resumeobj, uint64_t resumeoff, + const char *redactbook, int outfd, offset_t *off, + struct dmu_send_outparams *dsop); int dmu_send_estimate_fast(struct dsl_dataset *ds, struct dsl_dataset *fromds, zfs_bookmark_phys_t *frombook, boolean_t stream_compressed, - uint64_t *sizep); + boolean_t saved, uint64_t *sizep); int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap, boolean_t embedok, boolean_t large_block_ok, boolean_t compressok, - boolean_t rawok, int outfd, offset_t *off, struct dmu_send_outparams *dso); + boolean_t rawok, boolean_t savedok, int outfd, offset_t *off, + struct dmu_send_outparams *dso); typedef int (*dmu_send_outfunc_t)(objset_t *os, void *buf, int len, void *arg); typedef struct dmu_send_outparams { |