From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0C0C0158089 for ; Wed, 20 Sep 2023 22:58:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7149B2BC092; Wed, 20 Sep 2023 22:58:21 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3A3132BC014 for ; Wed, 20 Sep 2023 22:58:21 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qj69D-0008Ug-Hw for gentoo-user@lists.gentoo.org; Thu, 21 Sep 2023 00:58:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: How to move ext4 partition Date: Wed, 20 Sep 2023 22:58:15 -0000 (UTC) Message-ID: References: <20230920221647.5e3f00e7@digimed.co.uk> User-Agent: slrn/1.0.3 (Linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ebf94636-d94a-4e74-aed9-b36f17adb0fd X-Archives-Hash: a64368e1d0323a4ddf2cac2638fa6709 On 2023-09-20, Victor Ivanov wrote: > On Wed, 20 Sept 2023 at 22:29, Grant Edwards wrote: >> >> That depends on how long it takes me to decide on tar vs. rsync and >> what the appropriate options are. > > I've done this a number of times for various reasons over the last 1-2 > years, most recently a few months ago due to hard drive swap, and I > find tar works just fine: > > $ tar -cpf /path/to/backup.tar --xattrs --xattrs-include='*.*' -C / . > > Likewise to extract, but make sure "--xattrs" is present Yep, that's pretty much what I decided on based on the tar command shown at https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Stage Interestingly, the Arch Linux Wiki recommends using bsdtar because "GNU tar with --xattrs will not preserve extended attributes". > Provided backup space isn't an issue, I wouldn't bother with > compression. It could be a lot quicker too depending on the size of > your root partition. Both the drive being "fixed" and the backup drive are in a USB3 attached dual slot drive dock, so I'm thinking compression might be worthwhile. > Just make sure you update /etc/fstab and bootloader config file with > the new filesystem UUID or partition indices. I always forget one or the other until after I try to boot the first time. That's why I keep systemrescuecd and Gentoo minimal install USB drives on hand. -- Grant