From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29474 invoked from network); 27 Jun 2023 16:07:55 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 27 Jun 2023 16:07:55 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 65A6640C00; Wed, 28 Jun 2023 02:07:54 +1000 (AEST) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by minnie.tuhs.org (Postfix) with ESMTPS id 670CA41084 for ; Wed, 28 Jun 2023 02:07:48 +1000 (AEST) Date: Tue, 27 Jun 2023 17:50:01 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Steve Jenkin Message-ID: <20230627155001.KTa3w%steffen@sdaoden.eu> In-Reply-To: <5C26BE4B-2E6C-4E02-9536-3EA774FB6B47@canb.auug.org.au> References: <950C04A3-3D30-48ED-B956-74EDB7C910E3@iitbombay.org> <5C26BE4B-2E6C-4E02-9536-3EA774FB6B47@canb.auug.org.au> Mail-Followup-To: Steve Jenkin , COFF User-Agent: s-nail v14.9.24-485-g9a24819228 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. Message-ID-Hash: YF2U6VUMAWW6XOA3THNQZXH5E35D7U3I X-Message-ID-Hash: YF2U6VUMAWW6XOA3THNQZXH5E35D7U3I X-MailFrom: steffen@sdaoden.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: COFF X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [COFF] Re: Shell script advice: using 'dd' to write multiple media List-Id: Computer Old Farts Forum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Steve Jenkin wrote in <5C26BE4B-2E6C-4E02-9536-3EA774FB6B47@canb.auug.org.au>: |> On 27 Jun 2023, at 09:44, Bakul Shah wrote: |> f space is not an issue, you can use split(1) to divide |> the input in N pieces and then use a separate loop to copy |> them to the media. If you want to stream the distribution I had act mkdir -p "$target" act btrfs send $parent "$this" '|' \ zstd -zc -T0 $ZSTD_LEVEL '|' \ '('cd "$target" '&&' \ echo "$this" '>' .stamp '&&' \ split -a 4 -b 2000000000 -d -')' ) || exit $? for splitting BTRFS snapshots to VFAT filesystems. You then did act cat "$ball"/"$mydir"/* '|' zstd -dc '|' btrfs receive . to receive them. (Where "act" is act() { if [ -n "$DEBUG" ]; then echo eval "$@" else eval "$@" if [ $? -ne 0 ]; then echo 'PANIC: '$* exit 1 fi fi } ). I dropped that "ball" support, all my backup media now uses EXT4 or simply BTRFS directly. (Thing was that Linux cannot drive some external Seagate USB disks in a way that allows EXT4 or BTRFS on them, the "final sync" or fails, will all kernels tried, and some USB hints, too. MacOS X could create HFS?? just like that.) (That ".stamp" was if [ -f "$ball"/"$mydir"/.stamp ]; then snap=$(cat "$ball"/"$mydir"/.stamp) ... cd snapshots/"$mydir" || exit 11 if [ -d "$snap" ]; then echo '=== '$mydir': snapshot '$snap' already exists' exit 0 fi .). --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)