177 lines
4.5 KiB
Groff
177 lines
4.5 KiB
Groff
.\" $NetBSD: fssconfig.8,v 1.12 2016/07/29 05:20:33 pgoyette Exp $ */
|
|
.\"
|
|
.\"
|
|
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
.\" by Juergen Hannken-Illjes.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd July 29, 2016
|
|
.Dt FSSCONFIG 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm fssconfig
|
|
.Nd configure file system snapshot devices
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl cxv
|
|
.Ar device
|
|
.Ar path
|
|
.Ar backup
|
|
.Op Ar cluster Op Ar size
|
|
.Nm
|
|
.Fl u Op Fl v
|
|
.Ar device
|
|
.Nm
|
|
.Fl l Op Fl v
|
|
.Op Ar device
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
command configures file system snapshot pseudo disk devices.
|
|
It will associate the file system snapshot disk
|
|
.Ar device
|
|
with a snapshot of the file system mounted on
|
|
.Ar path ,
|
|
allowing
|
|
.Ar device
|
|
to be accessed as though it were a disk.
|
|
.Pp
|
|
If
|
|
.Ar backup
|
|
resides on the snapshotted file system a persistent snapshot will be created.
|
|
This snapshot is active until
|
|
.Ar backup
|
|
is unlinked.
|
|
Persistent snapshots save the file system as if it had been unmounted.
|
|
Unlinked but open files get removed from the snapshot.
|
|
The time needed to create a persistent snapshot increases with the size of the
|
|
file system and decreases with the file system block size.
|
|
This snapshot mode is only supported for FFS file systems.
|
|
.Pp
|
|
Otherwise data written through the
|
|
.Ar path
|
|
will be saved in
|
|
.Ar backup .
|
|
If
|
|
.Ar backup
|
|
is a regular file, it will be created with length
|
|
.Ar size .
|
|
Default size is the size of
|
|
.Ar path .
|
|
Data is saved to
|
|
.Ar backup
|
|
in units of
|
|
.Ar cluster
|
|
bytes.
|
|
The snapshot is an image of the underlying block device at a moment in time.
|
|
Unlinked but open files are still present on the snapshot.
|
|
The time needed to create a snapshot is independent of the size of the
|
|
file system or the file system block size.
|
|
.Pp
|
|
Options indicate an action to be performed:
|
|
.Bl -tag -width 3n
|
|
.It Fl c
|
|
Configures the device.
|
|
If successful, references to
|
|
.Ar device
|
|
will access the contents of
|
|
.Ar path
|
|
at the time the snapshot was taken.
|
|
If
|
|
.Ar backup
|
|
is a directory, a temporary file will be created in this directory.
|
|
This file will be unlinked on exit.
|
|
.It Fl l
|
|
List the snapshot devices and indicate which ones are in use.
|
|
If a specific
|
|
.Ar device
|
|
is given, then only that will be described.
|
|
.It Fl u
|
|
Unconfigures the
|
|
.Ar device .
|
|
.It Fl v
|
|
Be more verbose listing the snapshot devices.
|
|
.It Fl x
|
|
Unlink
|
|
.Ar backup
|
|
after the
|
|
.Ar device
|
|
is configured.
|
|
.El
|
|
.Pp
|
|
If no action option is given,
|
|
.Fl c
|
|
is assumed.
|
|
.Sh FILES
|
|
.Bl -tag -width /etc/disktab -compact
|
|
.It Pa /dev/rfss?
|
|
.It Pa /dev/fss?
|
|
.El
|
|
.Sh EXAMPLES
|
|
.Dl fssconfig fss0 /usr /tmp/back
|
|
.Dl mount /dev/fss0 /mnt
|
|
.Pp
|
|
Configures the snapshot device
|
|
.Pa fss0
|
|
as a snapshot of the
|
|
.Pa /usr
|
|
file system, and makes the contents of the snapshot available via
|
|
.Pa /mnt .
|
|
Data written through
|
|
.Pa /usr
|
|
will be backed up in
|
|
.Pa /tmp/back .
|
|
.Pp
|
|
.Dl fssconfig fss1 / /dev/rsd0e 8192
|
|
.Pp
|
|
Configures the snapshot device
|
|
.Pa fss1
|
|
as a snapshot of the
|
|
.Pa /
|
|
file system.
|
|
Data written through
|
|
.Pa /
|
|
will be backed up in
|
|
.Pa /dev/rsd0e .
|
|
The backup will take place in units of 8192 bytes.
|
|
.Pp
|
|
.Dl fssconfig -u fss0
|
|
.Pp
|
|
Unconfigures the
|
|
.Pa fss0
|
|
device.
|
|
.Sh SEE ALSO
|
|
.Xr opendisk 3 ,
|
|
.Xr fss 4 ,
|
|
.Xr dump 8 ,
|
|
.Xr mount 8 ,
|
|
.Xr umount 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
command appeared in
|
|
.Nx 2.0 .
|