Some questions about incus storage volume export

I haven’t run this cmd yet. Currently, I can’t reach my server.

Let’s say I have a btrfs volume running instances.

When I use incus storage volume export, it’s recommended to stop all instances when running this cmd? I only concern about data stored in disk.

I roughly remember a volume contains container folder, VM folder and some config folders. Let’s say only a project using this volume, and all setting won’t break in another server. Can I restore the volume to another incus server? I just don’t know how incus database work.

If I run a oci container with a custom volume, this custom volume is a subvolume of the btrfs volume, will the subvolume be exported when export?

If all instances were created from a snapshot of an instance. When export without --optimized-storage, does each instance still a extend of the snapshot, or will copy the snapshot with extend data to form a completely new object.

incus storage volume export can be racy when the volume is actively in use as that either relies on building up a tarball (filesystem volume) or a block copy (block volume) directly from the current version of the volume.

incus storage volume export --optimized is safer, at least on btrfs, as that will instead do a binary export of the subvolume which is atomic, so while it won’t magically flush any pending writes from the instances using it, at least the filesystem/block content will be consistent.

For instances, incus export will get you everything you need to re-import on a clean server, even when --optimized is passed. So if an instance was created from the snapshot of another, the export will still contain the whole thing, not just the difference.