Closed melato closed 6 years ago
I expect we'll be keeping the two concepts separate and that addition to our backups will further drive them away from images.
Right now they differ in:
To import a backup as a valid image, LXD would need to:
Because it'd need to be recompressed and re-hashed, this would equate to doing lxc import
+ lxc publish
, at which point you may as well just do that.
As for your questions, I suspect you were dealing with an optimized backup, or LXD thought it was an optimized backup anyway, in which case, binary ZFS data is part of the backup and so requires restoration on a ZFS pool running the same or more recent version of ZFS and because the various binary dumps refer to each another based on dataset name, requires the name be the same.
Closing this issue as we don't plan on the two concepts to become closer to each another, quite the opposite actually.
Feature Request. Based on LXD 3.6
I would like to import an exported container as an image. It already contains all the files of an exported image but with a different path prefix.
Justification: A tarball created by exporting a container is very similar with a tarball created by exporting an image. I would like to be able to use them interchangeably, with either or both of the following enhancements:
The two different tarballs are currently created by:
export a container:
export a container as an image:
An image has the following file structure:
An exported container has the file structure:
Both can be used for backups. The container export is faster, because it can be exported and imported directly between the container and the disk tarball. But it is more restrictive, because it can be imported only in a very similar LXD setup. I'm not exactly sure where it can be imported, but I've run to at least three problems:
These are some errors, I've encountered while trying to import an exported container:
An image does not have these restrictions. It is therefore more versatile as a backup solution (except that it needs the profiles, and perhaps other configuration, which can be exported and imported separately).