netinvent / npbackup

A secure and efficient file backup solution that fits both system administrators (CLI) and end users (GUI)
GNU General Public License v3.0
164 stars 5 forks source link

Allow pipe in data in CLI mode #45

Closed deajan closed 4 months ago

deajan commented 9 months ago

See N.L

deajan commented 9 months ago

So restic totally supports this via https://restic.readthedocs.io/en/latest/040_backup.html#reading-data-from-stdin

We need to find a way to redirect stdin to restic without the need of queues or additionnal python plumbing, to avoid memory copies. command_runner allows giving a subprocess a stdin pipe. Let's see if we can pass a fd (sys.stdin). If so, we need to handle:

deajan commented 4 months ago

Basically implemented, we still need to test this in compiled version in both windows and linux.

deajan commented 4 months ago

Tested on Linux and Windows platforms, both compiled and interpreted versions.