bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] multiple tapes


From: Alain Williams
Subject: Re: [Bug-cpio] multiple tapes
Date: Thu, 29 Jun 2006 10:12:22 +0100
User-agent: Mutt/1.4.1i

On Thu, Jun 29, 2006 at 10:15:10AM +0300, Sergey Poznyakoff wrote:

> > Another idea is to invent a new magic number: 070703 and corresponding
> > header format:
> 
> That would be the right way, I believe.
> 
> > It doesn't look hugely difficult to do.
> 
> Indeed, it doesn't. I guess I'll try to implement it. There is some more
> code cleanup waiting in my queue, so when I'm through with it I'll start
> working on this. Thanks for the idea.

Great, but before you start ...

why not take the opportunity to fix some of the other 'issues' with the cpio
format - things that would help greatly at making it a true file system backup
program; eg try to backup extended attributes, ACLs, ...

BTW: I am willing to help you in this, both design & coding.

Some of the above will be easy, other things not so. Here is a quick dump of 
ideas
that could be looked at:

* There needs to be a distinction between the cpio header that is in memory and
  the one that appears in the archive. Currently there is a 1 to 1 relationship,
  there is no reason why the archive header cannot contain optional parts: this 
means
  that a lot more information can *potentially* be stored without making the 
header
  huge in every case.
  The way to implement this is to have a word of flag bits at the start, example
  flags:
  * 64 bit file length, else 32 bits. 32 bits is enough for 99.99% of files 
backed up
  * maj/minor numbers - most files don't need this.
  * file length - not needed at all for devices/fifos/...

* Archive header: either

* username/group optionally as strings rather than numbers

* optionally store file access time

* end of archive is marked by a flag rather than a file with a funny name.
  This end-of-file header could include a few things like # files archived/...

* Second tapes as discussed, continuation file header. Note that the 
end-of-previous-tape
  could be occur while a file header was being written ... need to cope with 
that.

* ACLs. I must admit that I have not looked at these for a long time. We should 
attempt
  to cannonicalise so that we write something that is OS portable.

* Extended attributes. Also cannonicalise.

* First file on tape fields: this could include things like:
  * time tape written
  * machine name
  * label -- a bit of text from the command line, eg: 'incremental backup of 
joe's machine'

As I said, with the exception of ACLs & extended attribs none of this is 
difficult to do.


Want to go for it ?

-- 
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/

#include <std_disclaimer.h>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]