From cjc@cc942873-a.ewndsr1.nj.home.com  Mon Dec 20 21:53:25 1999
Return-Path: <cjc@cc942873-a.ewndsr1.nj.home.com>
Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207])
	by hub.freebsd.org (Postfix) with ESMTP id E8E4015257
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Dec 1999 21:53:24 -0800 (PST)
	(envelope-from cjc@cc942873-a.ewndsr1.nj.home.com)
Received: (from cjc@localhost)
	by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id AAA94195;
	Tue, 21 Dec 1999 00:58:00 -0500 (EST)
	(envelope-from cjc)
Message-Id: <199912210558.AAA94195@cc942873-a.ewndsr1.nj.home.com>
Date: Tue, 21 Dec 1999 00:58:00 -0500 (EST)
From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
Reply-To: cjc@cc942873-a.ewndsr1.nj.home.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Undocumented option in restore(8)
X-Send-Pr-Version: 3.2

>Number:         15600
>Category:       docs
>Synopsis:       Undocumented option in restore(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 20 22:00:02 PST 1999
>Closed-Date:    Wed Feb 16 18:15:25 PST 2000
>Last-Modified:  Wed Feb 16 18:15:46 PST 2000
>Originator:     Crist J. Clark
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
>Environment:

	First noticed on a 3.3-STABLE system. Patch derived from
	3.3-STABLE source. 2.2.8-STABLE and 3.4-RELEASE also are
	effected.

>Description:

	While looking over the code for restore(8),
	/usr/src/sbin/restore, for other reasons, I noticed that there
	is code for a flag, -N, which causes the dump to be executed
	normally, except no changes are actually made to the disk, or
	whatever media is the desitnation for the restore. This option
	is not documented on the manpage.

>How-To-Repeat:

	A search of the manpage shows no mention of flag,

	# man 8 restore | grep -- '-N'

	To see the flag in action, one can attempt to do a restore,

	# restore -xvNf /dev/rst0

	And watch the usual messages go by, but no writes actually
	take place. If you are not so trusting, take a look at the
	source code and see for yourself before you try the above.

>Fix:
	
	A patch to the restore manpage, restore.8:

--- /usr/src/sbin/restore/restore.8	Sun Aug 29 21:57:27 1999
+++ restore.8	Tue Dec 21 00:39:21 1999
@@ -41,32 +41,32 @@
 .Sh SYNOPSIS
 .Nm restore
 .Fl i
-.Op Fl chkmuvy
+.Op Fl chkmNuvy
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Nm restore
 .Fl R
-.Op Fl ckuvy
+.Op Fl ckNuvy
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Nm restore
 .Fl r
-.Op Fl ckuvy
+.Op Fl ckNuvy
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Nm restore
 .Fl t
-.Op Fl chkuvy
+.Op Fl chkNuvy
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
 .Op file ...
 .Nm restore
 .Fl x
-.Op Fl chkmuvy
+.Op Fl chkmNuvy
 .Op Fl b Ar blocksize
 .Op Fl f Ar file
 .Op Fl s Ar fileno
@@ -311,6 +311,10 @@
 This is useful if only a few files are being extracted,
 and one wants to avoid regenerating the complete pathname
 to the file.
+.It Fl N
+Do the extraction normally, but do not actually write any changes 
+to disk. This can be used to check the integrity of dump media 
+or other test purposes.
 .It Fl s Ar fileno
 Read from the specified
 .Ar fileno



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: unfurl 
State-Changed-When: Wed Feb 16 18:15:25 PST 2000 
State-Changed-Why:  
patch committed.... 
>Unformatted:
