Operating systems are Archlinux and NixOS.
In short, I don’t understand is why is this:
for part in ./offsite-backup.2025-02-16T10-23-18.part*.tar.gz.gpg; do
gpg --decrypt --always-trust --recipient offsite-backup $part > ${part%.gpg};
rm $part
done
cat ./offsite-backup.2025-02-16T10-23-18.part*.tar.gz | tar -xzf - -C restored
Doesn’t work the same as this:
mkfifo decrypted.pipe
cat decrypted.pipe | tar -xzf - -C restored &
for part in ./offsite-backup.2025-02-16T10-23-18.part*.tar.gz.gpg; do
gpg --decrypt --always-trust --recipient offsite-backup $part > decrypted.pipe
rm $part
done
The former works fine. The latter gives me a bunch of errors from gzip about having unexpected end of files. But it seems like from the perspective of tar, and by extension gzip, the data they are recieving would be identical.
Being able to use the latter approach would be helpful because it would allow me to avoid creating the intermediary .tar.gz files in order to complete the decompression. I end up having to temporarily store the entire archive in order to decompress it, but as far as I can tell this should not be necessary.