Date: Mon, 4 Feb 2019 14:29:58 +1030 From: "O'Connor, Daniel" <darius@dons.net.au> To: Warner Losh <imp@bsdimp.com> Cc: George Mitchell <george+freebsd@m5p.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Non-interactive multivolume restore Message-ID: <6D80822F-2060-4F93-A6B3-A913D6EFF3FE@dons.net.au> In-Reply-To: <CANCZdfr732j5q_O4ZxwJwY-FF5M4U5REGDoX-Xjr_6iN-zPE5w@mail.gmail.com> References: <5fc87495-8fdc-c1f3-0b95-8609347794f0@m5p.com> <CANCZdfr732j5q_O4ZxwJwY-FF5M4U5REGDoX-Xjr_6iN-zPE5w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 4 Feb 2019, at 13:59, Warner Losh <imp@bsdimp.com> wrote: > Multiple -f args? Maybe a printf format to clue restore into how to > construct the names? Maybe also some pipe command with a similar % > specification to allow restore from compressed files.. OP says you can only specify -f once. What about using -P? That can be scripted so you could do something = where a script checks a file for the current filename it should cat. -P pipecommand Use popen(3) to execute the sh(1) script string defined by pipecommand as the input for every volume in the backup. = This child pipeline's stdout (/dev/fd/1) is redirected to the = restore input stream, and the environment variable RESTORE_VOLUME = is set to the current volume number being read. The pipecommand = script is started each time a volume is loaded, as if it were a = tape drive. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6D80822F-2060-4F93-A6B3-A913D6EFF3FE>