xref: /netbsd-src/usr.sbin/fssconfig/fssconfig.8 (revision eceb233b9bd0dfebb902ed73b531ae6964fa3f9b)
1.\"	$NetBSD: fssconfig.8,v 1.12 2016/07/29 05:20:33 pgoyette 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 July 29, 2016
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 the file system mounted on
57.Ar path ,
58allowing
59.Ar device
60to be accessed as though it were a disk.
61.Pp
62If
63.Ar backup
64resides on the snapshotted file system a persistent snapshot will be created.
65This snapshot is active until
66.Ar backup
67is unlinked.
68Persistent snapshots save the file system as if it had been unmounted.
69Unlinked but open files get removed from the snapshot.
70The time needed to create a persistent snapshot increases with the size of the
71file system and decreases with the file system block size.
72This snapshot mode is only supported for FFS file systems.
73.Pp
74Otherwise data written through the
75.Ar path
76will be saved in
77.Ar backup .
78If
79.Ar backup
80is a regular file, it will be created with length
81.Ar size .
82Default size is the size of
83.Ar path .
84Data is saved to
85.Ar backup
86in units of
87.Ar cluster
88bytes.
89The snapshot is an image of the underlying block device at a moment in time.
90Unlinked but open files are still present on the snapshot.
91The time needed to create a snapshot is independent of the size of the
92file system or the file system block size.
93.Pp
94Options indicate an action to be performed:
95.Bl -tag -width 3n
96.It Fl c
97Configures the device.
98If successful, references to
99.Ar device
100will access the contents of
101.Ar path
102at the time the snapshot was taken.
103If
104.Ar backup
105is a directory, a temporary file will be created in this directory.
106This file will be unlinked on exit.
107.It Fl l
108List the snapshot devices and indicate which ones are in use.
109If a specific
110.Ar device
111is given, then only that will be described.
112.It Fl u
113Unconfigures the
114.Ar device .
115.It Fl v
116Be more verbose listing the snapshot devices.
117.It Fl x
118Unlink
119.Ar backup
120after the
121.Ar device
122is configured.
123.El
124.Pp
125If no action option is given,
126.Fl c
127is assumed.
128.Sh FILES
129.Bl -tag -width /etc/disktab -compact
130.It Pa /dev/rfss?
131.It Pa /dev/fss?
132.El
133.Sh EXAMPLES
134.Dl fssconfig fss0 /usr /tmp/back
135.Dl mount /dev/fss0 /mnt
136.Pp
137Configures the snapshot device
138.Pa fss0
139as a snapshot of the
140.Pa /usr
141file system, and makes the contents of the snapshot available via
142.Pa /mnt .
143Data written through
144.Pa /usr
145will be backed up in
146.Pa /tmp/back .
147.Pp
148.Dl fssconfig fss1 / /dev/rsd0e 8192
149.Pp
150Configures the snapshot device
151.Pa fss1
152as a snapshot of the
153.Pa /
154file system.
155Data written through
156.Pa /
157will be backed up in
158.Pa /dev/rsd0e .
159The backup will take place in units of 8192 bytes.
160.Pp
161.Dl fssconfig -u fss0
162.Pp
163Unconfigures the
164.Pa fss0
165device.
166.Sh SEE ALSO
167.Xr opendisk 3 ,
168.Xr fss 4 ,
169.Xr dump 8 ,
170.Xr mount 8 ,
171.Xr umount 8
172.Sh HISTORY
173The
174.Nm
175command appeared in
176.Nx 2.0 .
177