Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zed backup to stdout or existing file #284

Closed
FrankFoerster24 opened this issue Aug 17, 2023 · 2 comments · Fixed by #285
Closed

zed backup to stdout or existing file #284

FrankFoerster24 opened this issue Aug 17, 2023 · 2 comments · Fixed by #285
Labels
area/CLI Affects the command line

Comments

@FrankFoerster24
Copy link

Hi,

I would like to send the backup to some subsequent processing, eg. compression, encryption, and other voodoo before hitting the final backup target. I would very much like if I could make it write to a previously created named pipe which I could read from with other programs. Maybe a --force overriding the check would already do the trick.

Alternatively, sending the output to stdout to pipe it to other tools could also work.

Kind regards,
Frank.

@vroldanbet vroldanbet added the area/CLI Affects the command line label Aug 17, 2023
bison added a commit to bison/zed that referenced this issue Aug 17, 2023
This adds support for passing a single dash character as the filename
to both the backup and restore commands, resulting in them using
stdout and stdin respectively.

Fixes: authzed#284
bison added a commit that referenced this issue Aug 17, 2023
This adds support for passing a single dash character as the filename
to the backup command, resulting in it using stdin.  It also changes
the restore command to default to reading from stdin if no filename is
given.

Fixes: #284
bison added a commit to bison/zed that referenced this issue Aug 17, 2023
This adds support for passing a single dash character as the filename
to the backup command, resulting in it using stdout.  It also changes
the restore command to default to reading from stdin if no filename is
given.

Fixes: authzed#284
@bison
Copy link
Member

bison commented Aug 25, 2023

Thanks for filing this! The v0.13.0 release should support this now.

@FrankFoerster24
Copy link
Author

Hi,

thank you very much for the swift implementation. However, for completeness I'd like to add that I still have the use case to send the backup data to an existing file (which is AFAICS not possible right now).

This is my use case: I'd like to run backups using the provided docker images which don't have much other utilities, not even a shell to > redirect the stream on stdout AFAIK. I'm not keen to run my own images. The pattern I usually would use is that I send the data to a named pipe (created by mkfifo on a shared volume in an init container), have the zed container write to it and another container in the same pod read from it for further processing (compression, encryption, etc.). With zed refusing to write to the existing named pipe I cannot do that.

I'll find workarounds, but the described pattern would be fit most perfectly for me. Let me know how to proceed (reopen this issue, create a new one, go away and leave you alone... ;-)).

Thanks again and kind regards,
Frank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CLI Affects the command line
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants