Confusion with lxc-copy command

8 views
Skip to first unread message

Abraham S.A.H.

unread,
Feb 24, 2024, 12:11:56 PMFeb 24
to Lxc Users
Hello everyone,
`lxc-copy` command has a weird behaviour.

I have read LXC's “Getting started” article[1], LXC's Arch Wiki documentation[2] and LXC's manpages[3].

There are issues with `lxc-copy` command and its documentation.

## Opaque documentation about snapshots

As far as I understand from the documentations, `lxc-copy` can create two types of copies: 1. Regular complete copies, 2. Snapshots.

Nevertheless, it is unclear which type of copy it performs for each type of backing storage and particularly with and without `-s`, `-e` and `-B` flags!
The manpage implicitly imply 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?
And what is the mechanism for creating snapshots for each type of backing storage?

## Difference between `-e -D` and `-s` flags?
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.

## When to use `-B` flag
It's explicitly said in the manpage that:

> The  copy's  backing storage will be of the same type as the original container.

Is it talking about snapshot copies? Or regular copies? Can regular copy containers even be anything other than directory? And with any case, what the `-B` flag exactly does? Can you use this flag for regular copies, or they have to be used only with `-e` or `-s` options?

## Silent fails!

--
Best Regards,
Abraham
Sent with Tutanota; https://tuta.com

Abraham S.A.H.

unread,
Feb 24, 2024, 12:49:42 PMFeb 24
to Lxc Users
I'm sorry for the noise. I mistakenly sent my email before it was done.

Hello everyone,

I have read LXC's “Getting started” article[1], LXC's Arch Wiki
documentation[2] and LXC's manpages[3].

I think there are issues with `lxc-copy` command and its documentation.

## Opaque documentation about snapshots

As far as I understand from the documentations, `lxc-copy` can create
two types of copies: 1. Regular complete copies, 2. Snapshots.

Nevertheless, it is unclear which type of copy it performs for each
type of backing storage and particularly with and without `-s`, `-e`
and `-B` flags!
The manpage implicitly imply 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?
And what is the mechanism for creating snapshots for each type of
backing storage?

## Difference between `-e -D` and `-s` flags?
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.

## When to use `-B` flag?
It's explicitly said in the manpage that:

Is it talking about snapshot copies? Or regular copies? Can regular copy
containers even be anything other than directory? And with any case, what
the `-B` flag exactly does? Can you use this flag for regular copies,
or they have to be used only with `-e` or `-s` options?

## Silent fails!
`lxc-copy` silently fails without producing any error to the
terminal. It's quiet in most cases, even without `--quiet` option!

## When does it start automatically?
I have tried many combinations of options, but none of them make
`lxc-copy` to start the copy automatically after creating it. It's
probably a bug on my side and I have to open an issue for it. Or is it?

--
Best Regards,
Abraham
Sent with Tutanota; https://tuta.com
---
[1]:https://linuxcontainers.org/lxc/getting-started
[2]:https://wiki.archlinux.org/title/Linux_Containers
[3]:https://man.archlinux.org/listing?lang=en&pkgname=lxc

Reply all
Reply to author
Forward
0 new messages