// reference

Exportable sessions

Any session can be archived as a dedicated tar (session directory with its manifest), for sharing or archiving, and also later unarchived back into usable session anywhere else.

You can mount, write something, then unmount, and export reads session directory from disk, not over the mount:

mkdir -p ~/pfs-base ~/pfs-session ~/pfs-mnt
echo hello > ~/pfs-base/hello.txt

export SESSION_LAYER_DIR=~/pfs-session
export BASE_LAYER_DIRS=~/pfs-base
prismafs -n myproject --desc "export test" ~/pfs-mnt
echo world > ~/pfs-mnt/new.txt

Unmount (macOS: umount, Linux: fusermount3 -u), then export:

umount ~/pfs-mnt
prismafs export -o myproject.tar ~/pfs-session

Check that archive contains all session files/content and manifest:

tar -tvf myproject.tar

This should list new.txt and .prismafs-session manifest file. Export also prints manifest contents after archiving.

From here, you can import it somewhere else (any regular directory):

prismafs import myproject.tar ~/pfs-restored-session
ls ~/pfs-restored-session
cat ~/pfs-restored-session.prismafs-session

new.txt and manifest (same name, creation time, description, base path) should be there, and identical to original session.