Skip to main content

snapshot_create

Function snapshot_create 

Source
pub fn snapshot_create(
    parent_fd: BorrowedFd<'_>,
    source_fd: BorrowedFd<'_>,
    name: &CStr,
    readonly: bool,
) -> Result<()>
Expand description

Create a snapshot of the subvolume referred to by source_fd, placing it as name inside the directory referred to by parent_fd.

If readonly is true the new snapshot is created read-only. Requires CAP_SYS_ADMIN.