Hello everyone, I have written a similar post to the mailing list of LXC and also opened the related issues in its GitHub repository.
I have read LXC’s “Getting started” article[1], LXC’s Arch Wiki documentation[2] and LXC’s manpages. I also have done some experimentations with it.
In conclusion, I think that there are some issues with lxc-copy
CLI behaviour and its documentation.
I try to explain some of them down below.
lxc-copy documentation[3]
As far as I understand from the Manpages, lxc-copy
can create
two types of copies: 1. Regular complete copies, 2. Snapshots.
Nevertheless, it is unclear which method of copy it uses for each
type of backing storage, particularly with and without -s
and -e
flags.
Sounds like the manpage implicitly implies that it does the first type of copy by
default unless -s
or -e
flags are specified, regardless of the
backing storage type, and will create snapshots otherwise. Is that true?
That would be preferable if it explicitly explains that which type of copy it does for each type of backing storage, by default and also with -s
flag. Specially since lxc
does not a good job at providing reports by default.
lxc-copy fails silently [4]
lxc-copy
fails silently without producing any error to the terminal, by default.
An output is produced only when the -l
option with warn
or any higher value is specified.
It simply means that it’s quiet in all cases, eventhough not invoked with --quiet
option; which doesn’t seem to be the desired interface.
No difference between -e -D
and -s
flags[5]
It seems that there’s no actual difference between these two.
According to documentations, specially the manpage.
-e
option makes lxc-copy
to create a copy that is a snapshot and is ephemeral. Combination of -D
and -e
flags make lxc-copy
to create a copy that is a snapshot but is not ephemeral, which is exactly what -s
implied to do.