.TH snap.ro 8 "12 November 2011" "distorted.org.uk backup" .SH NAME snap.ro \- fake snapshot handler which remounts filesystems read-only .SH SYNOPSIS .B snap.ro .I device .IB key = value \&... .SH DESCRIPTION This is a fake snapshot handler. Rather than produce a snapshot device containing a consistent view of the origin's contents, it simply remounts the contained filesystem read-only. Obviously, this isn't satisfactory for operations which might alter the block device, but it's fine for stuff like backups. .PP The following options keys are recognized, either with a .RB ` .ro ' suffix or without. Other keys are reported as errors, unless the key contains a .RB ` . ' character. .TP .BI op= op The .I op must be either .B snap (the default) to create a `snapshot' \(en i.e., remount read-only \(en or .B unsnap to remove it \(en i.e., remount read/write. .TP .BI tag= tag On snapshot creation, record the .I tag in the filesystem before remounting readonly; on snapshot removal, verify that the tag recorded matches .IR tag . This prevents a different script from making the filesystem read/write prematurely. The default tag is .BR snap . .BI dir= mount-pt The filesystem is mounted on .IR mount-pt . If you omit this option, .B snap.ro will search .B /etc/mtab for a mount point for the given .IR device . If exactly one such mount point is found then it will be used; otherwise, an error is reported. .SH BUGS This assumes that the filesystem is mounted locally. If the block device is exported (e.g., to a virtual guest, or using a network block device) then this won't work and you'll need to do something more complicated. .PP Linux allows the same device to be mounted in several different places using bind mounts. Each of these occurrences needs to be made read-only if the device contents are to be made consistent; .BR snap.ro is too stupid to handle this properly: instead, if .B dir is omitted, it checks that the device is mentioned exactly once in .BR /etc/mtab . .SH SEE ALSO .BR snap (8), .BR mount (8). .SH AUTHOR Mark Wooding,