From nobody Fri Mar 29 12:15:41 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V5fWQ15mWz5GC39 for ; Fri, 29 Mar 2024 12:15:46 +0000 (UTC) (envelope-from cryintothebluesky@gmail.com) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5fWP0xQsz3y1l for ; Fri, 29 Mar 2024 12:15:45 +0000 (UTC) (envelope-from cryintothebluesky@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=Fv8hMdcw; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of cryintothebluesky@gmail.com designates 2a00:1450:4864:20::334 as permitted sender) smtp.mailfrom=cryintothebluesky@gmail.com Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4149749cc36so13267595e9.0 for ; Fri, 29 Mar 2024 05:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711714543; x=1712319343; darn=freebsd.org; h=content-transfer-encoding:mime-version:message-id:subject:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=sZxXfSwL7oLpHvwVIkCNO7IHXSUG7YUf7c+21gnlPd0=; b=Fv8hMdcwqhyurwxBlwMIA683le784IE5iwF1o5YJyVgwNOr5j7FA6XPiRYVrTHbiBX kE7jx4XWOWlnxUC4cYRL9mtz/yff2/2ABK7mnmeByt1jVezeVohtfIoMnzSx8gFfjmwT oqsHMIjsVMe9K/ia5aePPeAOOG7uMh6l5GG6/p8+hP9IP46yUlsg8m+VX4AP81WAkO+b 3skNF8md+grAXiGjwIC1nbtOZbdeSpZzkWmbw3m8ZlSJ4JUDAVCO7R2odPxGgqeTYIlN AyDvXyOXmpLVx17BGKpD+HF6qFFNidjY325UwyeGC74hBRE13dbaw/nUh66ZUMZ76AXf i2Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711714543; x=1712319343; h=content-transfer-encoding:mime-version:message-id:subject:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sZxXfSwL7oLpHvwVIkCNO7IHXSUG7YUf7c+21gnlPd0=; b=XUeQuM+lQjemEmyooHXYNarpB3yR8GwYrVx3pPlDCo/eB9eOQYKqmHVczZH4BWCZgr Eu9tU2tnvYxR5JzFbKOREPqgfCnEQhR1M5rT9jZbp8dKziFqHquoL3pwATmc7j4h1Cd4 JKDa6/OXE7wQs7PsktkeOGfwF7IFNC5N2VYZoh6tlKo9soLWAReogIqTMH0KaloV7See nstGgCwbL8iCTeFMpDYMzKBM6iVJ5w5n83GHfMgsyUWLEayj5QXHe/aPemk0WhxS0f0J PCP/Xe+tRBey0AIdfdxRdc5hjo1dGtGln6KBC6LvLfBrsO9XzH299oxpxovtdI/yDg0a mYhw== X-Gm-Message-State: AOJu0YxqHfticpuAu1VZufo+D6gPUmACbCQZdrKPQERkrJyzacIRva70 yF3KC0UJjgwHy57Q2+3x8jQW0XH19jPwcldi++W9CqFC+/r4219E1wczxxDr X-Google-Smtp-Source: AGHT+IE4nst9gig09vctLz9HzsjtRBYLkXGzLIQkXFhjbWebqyeCdqjbmqXIblDroxZ8yNwDmtNK9g== X-Received: by 2002:a05:600c:1907:b0:414:869b:dbd9 with SMTP id j7-20020a05600c190700b00414869bdbd9mr1650114wmq.9.1711714542737; Fri, 29 Mar 2024 05:15:42 -0700 (PDT) Received: from z600.home.lan (157.85.199.146.dyn.plus.net. [146.199.85.157]) by smtp.gmail.com with ESMTPSA id u22-20020a05600c139600b00414906f1ea1sm5211378wmf.17.2024.03.29.05.15.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 05:15:42 -0700 (PDT) Date: Fri, 29 Mar 2024 12:15:41 +0000 From: Sad Clouds To: freebsd-questions@FreeBSD.org Subject: UFS snapshots and dump/restore Message-Id: <20240329121541.9b0163bef978b5e5fcfd54a7@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.18 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.68)[-0.682]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::334:from] X-Rspamd-Queue-Id: 4V5fWP0xQsz3y1l Hello, I have questions about dump/restore which seem to ignore the nodump flag for UFS snapshots: Create snapshot: # snapshot="/data/.snap/latest" # mksnap_ffs ${snapshot} && chflags nodump ${snapshot} Restore snapshot: # snapshot="/data/.snap/latest" # cd $(dirname ${snapshot})/../ && dump -0 -a -h 0 -C 16 -b 64 -f - ${snapshot} | restore -xuvf - ... extract file ./.snap/latest ... Despite the nodump flag, /data/.snap/latest is still dumped and restored. This causes /data/.snap/latest to be reset to 0 bytes after running restore and the snapshot is lost. Any idea why such behaviour? What happens to the snapshot if I restore specific files, i.e. # dump -0 -a -h 0 -C 16 -b 64 -f - ${snapshot} | restore -xuvf - ./file1 ./file2 ...etc Can this cause inode numbers to change for those files in unpredictable ways and cause corruption of the snapshot, or is this completely safe? Thanks.