// reference
prismafs replay
Replay is like a snapshot of session and everything session recorded, and then it can recreate session content in any regular filesystem directory on disk without later requiring mounting, outside of PrismaFS, for permanent storage or sharing.
IMPORTANT: this is a one time operation, not sync, meaning it will happily overwrite files that exist in target directory.
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 ~/pfs-mnt echo world > ~/pfs-mnt/new.txt echo changed > ~/pfs-mnt/hello.txt
Unmount (macOS: umount, Linux: fusermount3 -u), then "replay" into any target directory:
umount ~/pfs-mnt mkdir -p ~/pfs-target prismafs replay ~/pfs-session ~/pfs-target ls ~/pfs-target cat ~/pfs-target/new.txt
Only new.txt is shown, replay only applies session content, it doesn't copy BASE layer for you. To do a merge with BASE, replay into copy of BASE like:
rm -rf ~/pfs-target cp -r ~/pfs-base ~/pfs-target prismafs replay ~/pfs-session ~/pfs-target cat ~/pfs-target/hello.txt cat ~/pfs-target/new.txt
hello.txt should now say changed, and new.txt should exist. Target directory doesn't have to be original base, try replaying into any unrelated directory to confirm it only applies recorded changes to whatever is there.