NetBSD Problem Report #60474

From www@netbsd.org  Tue Jul 21 21:09:13 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 24A6D1A923B
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Jul 2026 21:09:13 +0000 (UTC)
Message-Id: <20260721210911.93CDE1A923C@mollari.NetBSD.org>
Date: Tue, 21 Jul 2026 21:09:11 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: restore: spurious "warning: ...: File exists" on incremental restore
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60474
>Category:       bin
>Synopsis:       restore: spurious "warning: ...: File exists" on incremental restore
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 21 21:10:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
The NetBSD Restoration, Inc.
>Environment:
>Description:

	It appears that when restoring an incremental level>0 dump on
	top of a level0 dump, restore(8) will spuriously warn about
	directories that already exist:

$ restore -x -f level0.dump
$ restore -x -f level1.dump
...
warning: ./conversion/hg/pkgsrc/.hg/store/data/wayland: File exists
warning: ./conversion/hg/pkgsrc/.hg/store/data/wayland/xwayland: File exists
warning: ./conversion/hg/pkgsrc/.hg/store/data/wayland/foot: File exists
warning: ./conversion/hg/pkgsrc/.hg/store/data/wayland/foot/patches: File exists
...

	The restore(8) man page doesn't address this warning.

	=> If this warning is important to heed, then perhaps the man
	   page should mention it.

	=> But if, as I suspect, this is perfectly normal and to be
	   expected because the directories in question were already
	   created by restoring from the level0 dump, then the warning
	   is actively harmful because it contributes to warning
	   fatigue.

	(Perhaps this isn't an issue for `restore -r' when
	reconstructing a whole file system, rather than extracting part
	of a dump, but a perfectly normal use of `restore -x' should
	also work without warnings too.)

>How-To-Repeat:

	1. Take a level0 dump.
	2. Change some files and directories.
	3. Take a level1 dump.
	4. Extract the level0 dump with restore -x.
	5. Extract the level1 dump on top of it with restore -x.

>Fix:

	Yes, please!

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.