Skip to content

Commit

Permalink
rbd docs: document cp versus deep cp
Browse files Browse the repository at this point in the history
I found that the difference between "rbd cp" and "rbd deep cp",
i.e. what "deep" means in this context, is documented only in
the mailing list archive and in the Mimic reelase notes.

Let's make the difference explicit in the manpage and in rbd --help.

Signed-off-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  • Loading branch information
Yenya committed May 25, 2021
1 parent 68236db commit 87bb491
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/man/8/rbd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Commands

:command:`deep cp` (*src-image-spec* | *src-snap-spec*) *dest-image-spec*
Deep copy the content of a src-image into the newly created dest-image.
Deep copy will copy all the image snapshots as well as the "head".
Dest-image will have the same size, object size, image format, and snapshots as src-image.

:command:`device list` [-t | --device-type *device-type*] [--format plain | json | xml] --pretty-format
Expand Down
2 changes: 1 addition & 1 deletion src/test/cli/rbd/help.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
config pool set Set a pool-level configuration override.
copy (cp) Copy src image to dest.
create Create an empty image.
deep copy (deep cp) Deep copy src image to dest.
deep copy (deep cp) Deep copy (with snapshots) src to dest.
device list (showmapped) List mapped rbd images.
device map (map) Map an image to a block device.
device unmap (unmap) Unmap a rbd device.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rbd/action/Copy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ int execute_deep(const po::variables_map &vm,
}

Shell::Action action_deep(
{"deep", "copy"}, {"deep", "cp"}, "Deep copy src image to dest.",
{"deep", "copy"}, {"deep", "cp"}, "Deep copy (with snapshots) src to dest.",
at::get_long_features_help(), &get_arguments_deep, &execute_deep);

} // namespace copy
Expand Down

0 comments on commit 87bb491

Please sign in to comment.