I did a backup/export with:
lxc export toots toots.tar --compression=none --instance-only --optimized-storage
I got a 17G file:
# ls -lha /mnt/storagebox/lxd-backups/toots.tar
-rw-rw---- 1 root root 17G Sep 12 07:38 /mnt/storagebox/lxd-backups/toots.tar
If I look with zfs list
, used space is 9.50G with snapshots:
# zfs list local/containers/toots
NAME USED AVAIL REFER MOUNTPOINT
local/containers/toots 9.50G 42.7G 6.72G /var/snap/lxd/common/lxd/storage-pools/local/containers/toots
Real size on container is 6.80G:
# lxc exec toots -- df -h /
Filesystem Size Used Avail Use% Mounted on
local/containers/toots 50G 6.8G 43G 14% /
That’s a bit strange… Is --instance-only
really working?
Even if backup/container.bin
in the tar file contains snapshots the size seems really wrong.
Maybe --optimized-storage
is the culprit? I use ZFS for containers, but my backup storage is a CIFS volume.
Details on the image:
# file backup/container.bin
backup/container.bin: ZFS shapshot (little-endian machine), version 17, type: ZFS, destination GUID: E6 8A AC 92 EC 39 D3 09, name: 'local/containers/toots@backup-0d19a50d-7733-4e0b-bdd8-ba19c68a39f4'
Any ideas?