From owner-freebsd-questions@freebsd.org Thu Apr 26 10:40:46 2018 Return-Path: Delivered-To: freebsd-questions@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 B3948FA9DDE for ; Thu, 26 Apr 2018 10:40:46 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20498826F6 for ; Thu, 26 Apr 2018 10:40:45 +0000 (UTC) (envelope-from Olivier.Nicole@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (localhost [127.0.0.1]) by mail.cs.ait.ac.th (Postfix) with ESMTP id 90A3B61F86; Thu, 26 Apr 2018 17:32:31 +0700 (+07) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cs.ait.ac.th; h= content-type:content-type:mime-version:message-id:date:date :in-reply-to:subject:subject:from:from:received:received :received; s=selector1; t=1524738751; x=1526553152; bh=d4o12qSHG 4+n33/gN7WLJ24byyk3C36jvlCrKKZGO58=; b=FwkSY2B/7INKXoJPNlAYsex0K XUjdiHjrKb7z7RqyQzwCCla22asbiRAHg51XPQvehDS2SnmHztE2KQjC2xkURkuW MLNYx+j6btqzCSlTbTWhz3+rIO6P6X+S8eAObHQBx5jrFyDzrerAApd6iEH4W0hw b2+E8sBWhq5MIGBEWU= X-Virus-Scanned: amavisd-new at cs.ait.ac.th Received: from mail.cs.ait.ac.th ([127.0.0.1]) by mail.cs.ait.ac.th (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 30und2PKzZnS; Thu, 26 Apr 2018 17:32:31 +0700 (+07) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id 16E0361F85; Thu, 26 Apr 2018 17:32:31 +0700 (+07) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.15.2/8.15.2/Submit) id w3QAWSo4009649; Thu, 26 Apr 2018 17:32:28 +0700 (ICT) (envelope-from on@banyan.cs.ait.ac.th) From: Olivier To: "Frank Leonhardt \(m\)" Cc: freebsd-questions@freebsd.org Subject: Re: Backing up to tape In-Reply-To: <28BACDED-FDCC-415B-AABA-732FE36A3E91@fjl.co.uk> (frank2@fjl.co.uk) Date: Thu, 26 Apr 2018 17:32:28 +0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2018 10:40:46 -0000 "Frank Leonhardt (m)" writes: > On 25 April 2018 19:10:02 BST, Sergey Matveev wrote: >>*** Frank Leonhardt [2018-04-25 21:00]: >>>If I plug a SAS drive in to an HBA it'll just appear as /dev/sa0 (or >>similar) >>>- right? >>> >>>Then I can backup everything with tar -cf /dev/sa0 /* - right? >>> >>>Is anyone using tape able to confirm any of this one way or another? >> >>I have purchased Ultrium LTO5 SAS tape drive for several months ago and >>use it with HardenedBSD. Everything you wrote is right. It appears >>(connected through SAS HBA) as /dev/sa0, /dev/nsa0, /dev/esa0 and you >>can directly use tar with it without any problems. mt command allows >>you >>to rewind and seek records on the tape. And neither native tar supports >>multivolume archives nor tape drive will do anything with it -- you >>have >>to split volumes manually somehow. You can easily do something like: >>zfs send zroot > /dev/sa0 to write your ZFS dataset directly to the >>tape >>and then restore from it. > > Thanks Sergey! Good to know the tape stuff still works. I've ordered a drive. > > I'll need a utility to save/restore ZFS datasets that are larger than one tape if anyone knows of one. Otherwise I'll be writing one, if anyone is interested. While it should not be too difficult to design such a utility, you have to consider that each time you will want to access any data on the tar, you will have to stream through all the tapes, because tar format does not allow you to start with the tape 5 even if you know that the file you are looking for is not on the first 4 tapes. And tar will continue to stream through all the trailing tapes even if the file you are looking for was found on the first tape (I think that tar strores the newer version of a file at the end of the archive, so it has to process the tar file to the end to be sure there is no newer version of the file you extract). It would be much better to split the data you want to tar, to have one set of data filling almost one tape. Best regards, Olivier