From owner-freebsd-hackers@freebsd.org Mon Feb 4 04:06:30 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC29514BD7F3 for ; Mon, 4 Feb 2019 04:06:29 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail03.adl2.internode.on.net (ipmail03.adl2.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4676C5B4 for ; Mon, 4 Feb 2019 04:06:20 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp118-210-82-95.bras2.adl4.internode.on.net (HELO midget.dons.net.au) ([118.210.82.95]) by ipmail03.adl2.internode.on.net with ESMTP; 04 Feb 2019 14:31:07 +1030 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x1440qas023501 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 4 Feb 2019 14:31:02 +1030 (ACDT) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x143xDuO019991 for ; Mon, 4 Feb 2019 14:29:13 +1030 (ACDT) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from [203.31.81.59] ([203.31.81.59]) by ppp118-210-82-95.bras2.adl4.internode.on.net (envelope-sender ) (MIMEDefang) with ESMTP id x143x7VB019988; Mon, 04 Feb 2019 14:29:13 +1030 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: Re: Non-interactive multivolume restore From: "O'Connor, Daniel" In-Reply-To: Date: Mon, 4 Feb 2019 14:29:58 +1030 Cc: George Mitchell , FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <6D80822F-2060-4F93-A6B3-A913D6EFF3FE@dons.net.au> References: <5fc87495-8fdc-c1f3-0b95-8609347794f0@m5p.com> To: Warner Losh X-Mailer: Apple Mail (2.3445.102.3) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=HELO_MISC_IP, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 2A4676C5B4 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.68 / 15.00]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[midget.dons.net.au]; RCVD_NO_TLS_LAST(0.10)[]; RCVD_IN_DNSWL_LOW(-0.10)[141.137.101.150.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[95.82.210.118.zen.spamhaus.org : 127.0.0.11]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.97)[0.967,0]; TAGGED_RCPT(0.00)[freebsd]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[dons.net.au]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(0.95)[0.954,0]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.98)[0.978,0]; R_SPF_NA(0.00)[]; IP_SCORE(0.39)[ipnet: 150.101.0.0/16(1.59), asn: 4739(0.41), country: AU(-0.04)] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 04:06:30 -0000 > On 4 Feb 2019, at 13:59, Warner Losh 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