Skip to content

Fix restore failing on a piped backup#141

Merged
d4rken merged 1 commit into
devfrom
fix/apl-feed-restore-stdin
Jun 18, 2026
Merged

Fix restore failing on a piped backup#141
d4rken merged 1 commit into
devfrom
fix/apl-feed-restore-stdin

Conversation

@d4rken

@d4rken d4rken commented Jun 18, 2026

Copy link
Copy Markdown
Member

Restoring a feeder backup that is piped into apl-feed restore /dev/stdin failed with a misleading "does not exist" error. The source check only accepted regular files, so a pipe was rejected outright; and even past that, the parser reopens its input once per field, which a single-read pipe cannot satisfy.

A non-seekable source is now buffered into a bounded temporary file before parsing, so a piped backup restores correctly. Restores from a regular file path are unchanged and a genuinely missing path still reports that it does not exist.

restore documented `/dev/stdin` as a valid source, but the `[[ -f ]]` guard is true only for regular files, so a piped payload died with a misleading "does not exist". Even past that, read_backup_file reopens its argument once per field, which a single-read pipe cannot satisfy. Materialise a non-seekable source into a bounded temp file before parsing; regular-file paths keep their existing existence check.
@d4rken d4rken merged commit 81317ac into dev Jun 18, 2026
13 checks passed
@d4rken d4rken deleted the fix/apl-feed-restore-stdin branch June 18, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant