1.\" $NetBSD: fssconfig.8,v 1.7 2008/04/30 13:11:02 martin Exp $ */ 2.\" 3.\" 4.\" Copyright (c) 2003 The NetBSD Foundation, Inc. 5.\" All rights reserved. 6.\" 7.\" This code is derived from software contributed to The NetBSD Foundation 8.\" by Juergen Hannken-Illjes. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd January 31, 2005 32.Dt FSSCONFIG 8 33.Os 34.Sh NAME 35.Nm fssconfig 36.Nd configure file system snapshot devices 37.Sh SYNOPSIS 38.Nm 39.Op Fl cxv 40.Ar device 41.Ar path 42.Ar backup 43.Op Ar cluster Op Ar size 44.Nm 45.Fl u Op Fl v 46.Ar device 47.Nm 48.Fl l Op Fl v 49.Op Ar device 50.Sh DESCRIPTION 51The 52.Nm 53command configures file system snapshot pseudo disk devices. 54It will associate the file system snapshot disk 55.Ar device 56with a snapshot of 57.Ar path 58allowing the latter to be accessed as though it were a disk. 59.Pp 60If 61.Ar backup 62resides on the snapshotted file system a persistent snapshot will be created. 63This snapshot is active until 64.Ar backup 65is unlinked. 66This snapshot mode is only supported for ffs files systems. 67.Pp 68Otherwise data written through the 69.Ar path 70will be saved in 71.Ar backup . 72If 73.Ar backup 74is a regular file, it will be created with length 75.Ar size . 76Default size is the size of 77.Ar path . 78Data is saved to 79.Ar backup 80in units of 81.Ar cluster 82bytes. 83.Pp 84Options indicate an action to be performed: 85.Bl -tag -width 3n 86.It Fl c 87Configures the device. 88If successful, references to 89.Ar device 90will access the contents of 91.Ar path 92at the time the snapshot was taken. 93If 94.Ar backup 95is a directory, a temporary file will be created in this directory. 96This file will be unlinked on exit. 97.It Fl l 98List the snapshot devices and indicate which ones are in use. 99If a specific 100.Ar device 101is given, then only that will be described. 102.It Fl u 103Unconfigures the 104.Ar device . 105.It Fl v 106Be more verbose listing the snapshot devices. 107.It Fl x 108Unlink 109.Ar backup 110after the 111.Ar device 112is configured. 113.El 114.Pp 115If no action option is given, 116.Fl c 117is assumed. 118.Sh FILES 119.Bl -tag -width /etc/disktab -compact 120.It Pa /dev/rfss? 121.It Pa /dev/fss? 122.El 123.Sh EXAMPLES 124.Dl fssconfig fss0 /usr /tmp/back 125.Pp 126Configures the snapshot device 127.Pa fss0 128for a snapshot of the 129.Pa /usr 130file system. 131Data written through 132.Pa /usr 133will be backed up in 134.Pa /tmp/back . 135.Pp 136.Dl fssconfig fss1 / /dev/rsd0e 8192 137.Pp 138Configures the snapshot device 139.Pa fss1 140for a snapshot of the 141.Pa / 142file system. 143Data written through 144.Pa / 145will be backed up in 146.Pa /dev/rsd0e . 147The backup will take place in units of 8192 bytes. 148.Pp 149.Dl fssconfig -u fss0 150.Pp 151Unconfigures the 152.Pa fss0 153device. 154.Sh SEE ALSO 155.Xr opendisk 3 , 156.Xr fss 4 , 157.Xr mount 8 , 158.Xr umount 8 159.Sh HISTORY 160The 161.Nm 162command appeared in 163.Nx 2.0 . 164.Sh BUGS 165The 166.Xr fss 4 167driver is 168.Em experimental . 169Be sure you have a backup before you use it. 170