fdupoux / fsarchiver

file system archiver for linux
http://www.fsarchiver.org
GNU General Public License v2.0
249 stars 41 forks source link

add the ability to save to and restore from a pipe #111

Closed bhodgens closed 2 years ago

bhodgens commented 2 years ago

While attempting to restore from a named pipe the following error is experienced -


# fsarchiver restfs pipe id=0,dest=/dev/sda1
archreader.c#83,archreader_open(): /root/pipe is not a regular file, cannot continue
thread_archio.c#145,thread_reader_fct(): archreader_open(pipe) failed
oper_restore.c#1061,extractar_read_mainhead(): queue_dequeue_header() failed: cannot read main header

Additionally, attempting to save to "-" results in -.fsa being created; saving to a named pipe results in a similar error as above:


# fsarchiver savefs pipe.fsa /dev/sda1
archwriter.c#90,archwriter_create(): pipe.fsa already exists, and is not a regular file.

Being able to save and restore to a pipe would be immensely useful, to allow saving and restoring over a network using nc.

nh3oh commented 2 years ago

Hi! I guess here is the same request for getting a way to build locally the file.fsa (server's backup), fsarchiver being ran through ssh without to have to create the file.fsa server side.

Best regards.

fdupoux commented 2 years ago

Using stdin/stdout is not possible by design (as there are seek calls) and it would require major changes for this to be supported.