NAME
Filesys::POSIX::Snapshot - Create and operate on filesystem snapshots
SYNOPSIS
use Filesys::POSIX::Snapshot;
...
$fs->mkpath('/snapshots/1');
$fs->mount(Filesys::POSIX::Snapshot->new, '/snapshots/1',
'path' => '/'
);
DESCRIPTION
This module implements a sort of snapshotting, or copy-on-write, mechanism that allows for the manipulation of any part of a filesystem in an isolated manner that does not affect the original data.
Depending on mount arguments, directory hierarchies are copied into memory as they are encountered, or are copied entirely into memory. Regular files are duplicated only when they are opened with $O_WRONLY
or $O_RDWR
flags.
MOUNT ARGUMENTS
The following mount arguments are accepted by Filesys::POSIX::Snapshot.
The following value is mandatory:
path
-
The path within the current virtual filesystem which the snapshot will be based on.
The following value is not mandatory:
immediate_dir_copy
-
When set to a true value, the entire hierarchy of directory listings and inodes will be duplicated into memory from its source specified in the
path
value.