Random-access archive for Unix use
I'm looking for a good format for archiving entire file-systems of 开发者_C百科old Linux computers.
TAR.GZ
The tar.gz format is great for archiving files with UNIX-style attributes, but since the compression is applied across the entire archive, the design precludes random-access. Instead, if you want to access a file at the end of the archive, you have to start at the beginning and decompress the whole file (which could be several hundred GB) up to the point where you find the entry you're looking for.ZIP
Conversely, one selling point of the ZIP format is that it stores an index of the archive: filenames are stored separately with pointers to the location within the archive were to find the data. If I want to extract a file at the end, I look up the position of that file by name, seek to the location, and extract the data. However, it doesn't store file attributes such as ownership, permissions, symbolic links, etc.Other options?
I've tried using squashfs, but it's not really designed for this purpose. The file format is not consistent between versions, and building the archive takes a lot of time and space.What other options might suit this purpose better?
You can check duplicty
. It allow you to make compressed and encrypted backup and allows random access to file. Here you can find more info about these project: http://duplicity.nongnu.org/new_format.html.
If you want use it you can also check script duply
. Is is shell front end for duplicty
. More info: http://sourceforge.net/projects/ftplicity/
zip (you can use http://www.info-zip.org/ ) stores file attributes - please see Wiki
Each entry is introduced by a local header with information about the file such as the comment, file size and file name, followed by optional "Extra" data fields, and then the possibly compressed, possibly encrypted file data. The "Extra" data fields are the key to the extensibility of the ZIP format. "Extra" fields are exploited to support the ZIP64 format, WinZip-compatible AES encryption, file attributes, and higher-resolution NTFS or Unix file timestamps. Other extensions are possible via the "Extra" field. ZIP tools are required by the specification to ignore Extra fields they do not recognize.
精彩评论