Try using new "dependent" fonction in 6.23

I am currently testing “dependent” mode and I get an error during the restore.
Very simple sample. I don’t understand my error. Any idea? Thanks.

Here is my complete test:

  1. Create a container with a dependent volume
    incus remote add hub https://registry.hub.docker.com --protocol=oci
    incus create hub:gristlabs/grist:latest grist --profile mycontainerapp
    -c environment.GRIST_DEFAULT_EMAIL="test@test.com"
    -c environment.GRIST_SESSION_SECRET=“secret”
    incus storage volume create zfs grist-data dependent=true
    incus config device add grist grist-data disk
    pool=zfs
    source=grist-data
    path=/persist
    dependent=true

  2. Start & Stop the container
    incus start grist
    incus stop grist

  3. Making export
    incus export grist TEST-grist.tar.gz --optimized-storage --instance-only

  4. Deleting the container
    incus storage volume detach zfs grist-data grist
    incus storage volume delete zfs grist-data
    incus delete grist

  5. Importing the container from export
    incus import TEST-grist.tar.gz grist

    Error: Create instance from backup: Create custom volume from backup: Error starting unpack: Failed to run: tar -zxf - --xattrs-include=* --restrict --force-local --numeric-owner -C /var/lib/incus/storage-pools/zfs/custom/default_grist-data --transform=s/^backup/grist-data/volume/./ backup/grist-data/volume: exit status 2 (tar: backup/grist-data/volume : non trouvé dans l’archive
    tar: Arrêt avec code d’échec à cause des erreurs précédente

@presztak can you look at this as you’re fixing other issues with the dependent volume handling? Sounds like the generated backup is missing the volume entries, I’m guessing it’s probably got to do with --optimized-storage.

@marcel23 can you try without --optimized-storage, see if that helps?
If not, try without --instance-only even though that last flag should only really impact whether snapshots are included or not.

I confirm “–optimized-storage” is the issue

yep, I’ll take a look.