From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Steve Jenkin <sjenkin@canb.auug.org.au>
Cc: COFF <coff@tuhs.org>
Subject: [COFF] Re: Shell script advice: using 'dd' to write multiple media
Date: Tue, 27 Jun 2023 17:50:01 +0200 [thread overview]
Message-ID: <20230627155001.KTa3w%steffen@sdaoden.eu> (raw)
In-Reply-To: <5C26BE4B-2E6C-4E02-9536-3EA774FB6B47@canb.auug.org.au>
Steve Jenkin wrote in
<5C26BE4B-2E6C-4E02-9536-3EA774FB6B47@canb.auug.org.au>:
|> On 27 Jun 2023, at 09:44, Bakul Shah <bakul@iitbombay.org> 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)
next prev parent reply other threads:[~2023-06-27 16:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 23:09 [COFF] " steve jenkin
2023-06-26 23:21 ` [COFF] " Dave Horsfall
2023-06-26 23:44 ` steve jenkin
2023-06-27 21:01 ` Dave Horsfall
2023-06-26 23:32 ` Clem Cole
2023-06-27 4:43 ` Steve Jenkin
2023-06-26 23:44 ` Bakul Shah
2023-06-27 3:47 ` Steve Jenkin
2023-06-27 15:50 ` Steffen Nurpmeso [this message]
2023-06-27 16:07 ` Steffen Nurpmeso
2023-06-27 0:25 ` segaloco via COFF
2023-06-27 6:23 ` Ralph Corderoy
2023-06-27 6:28 ` Adam Thornton
2023-06-27 6:33 ` Ralph Corderoy
2023-06-27 7:53 ` steve jenkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230627155001.KTa3w%steffen@sdaoden.eu \
--to=steffen@sdaoden.eu \
--cc=coff@tuhs.org \
--cc=sjenkin@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).