From owner-freebsd-questions@FreeBSD.ORG Sat Aug 27 04:58:19 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C2B416A41F; Sat, 27 Aug 2005 04:58:19 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id F230143D49; Sat, 27 Aug 2005 04:58:18 +0000 (GMT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9p2/8.12.9) with ESMTP id j7R4wIYk076143; Fri, 26 Aug 2005 21:58:18 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9p2/8.12.9/Submit) id j7R4wI5f076140; Fri, 26 Aug 2005 21:58:18 -0700 (PDT) (envelope-from dillon) Date: Fri, 26 Aug 2005 21:58:18 -0700 (PDT) From: Matthew Dillon Message-Id: <200508270458.j7R4wI5f076140@apollo.backplane.com> To: Emanuel Strobl References: <200508262004.54637@harrymail> <200508270316.j7R3GE7P075733@apollo.backplane.com> <200508270523.50609@harrymail> Cc: freebsd-current@freebsd.org, freebsd-questions@freebsd.org Subject: Re: cpio and tar are loosing flags (and a panic message without trace) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 04:58:19 -0000 :Thank you, I know cpdup but I haven't known that it's flags aware! :Unfortunately I need to write to a raw device, I guess there's no way for=20 :cpdup without a filesystem... : :I guess cpio and tar really should take care about flags. Am I wrong? : :Thanks, : :=2DHarry cpio won't do it, tar won't do it, dump only does whole partitions, cpdup is not an archiver. Hmm. I can think of two possibilities. First, use a MFS or VN block device, create a filesystem, and use cpdup, then gzip the file representing the backing store. Since the extra space in the filesystem will contain zeros (you should make sure it does, that is), it should compress pretty well. Second, use cpio and then do a separate 'find' or 'ls' or something to get the chflags info and write a script that restores the flags after unpacking. They are both pretty narley solutions. Hmm.. wait a sec... I just thought up of another possibility... take the tar or cpio source code and modify it to also save and restore the chflags data. It won't be a 'standard' utility any more, but it WILL work for your needs. Call it by another name so there's no confusion. That might be your best bet, actually. -Matt