由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - tar出来的文件的错容性怎么样?
相关主题
is there any opensource c/c++ lib can extract files from .z一个读doc里文档的小问题
如何往LAN上面的server高速上传文件?求救: 计算机系统恢复
git真是耗内存啊。。。solaris的ssh为什么后台执行的时候进程不退出?
问题:关于python和web追新的Arch才能保证稳定和安全
大家都是如何作备份的呢?怎样保证隐私?
请问如何在windows下解压缩.gz文件请问怎样从远程服务器传送海量文件
Emacs on X 显示古怪黑白框求教怎样把scp下载的文件on-the-fly打包?
初学linux,好几个小问题。文件合并请问有什么方法可以替代zcat和cat
相关话题的讨论汇总
话题: tar话题: archive话题: files话题: afio
进入Linux版参与讨论
1 (共1页)
l********k
发帖数: 14844
1
目前有海量(T量级)的小文件(~512kB)要备份,想要压缩,但是又有错容性和访问
便捷性的顾虑。主要是考虑到万一有错误的bit,或者物理损坏(当然是在有备份的情
况下),打包出来的大文件会不会整个都毁了?如果根本不打包,那么出错的话,损失
也不会扩大到整个数据。
tar出来的文件,如果不压缩,对文件中间出现错位、物理损坏的错容性如何?
b*s
发帖数: 82482
2
我用tar打包过300-400 GB的 1 MB左右的小文件,好像没有出过问题。不打包copy 速
度太难以忍受了……

【在 l********k 的大作中提到】
: 目前有海量(T量级)的小文件(~512kB)要备份,想要压缩,但是又有错容性和访问
: 便捷性的顾虑。主要是考虑到万一有错误的bit,或者物理损坏(当然是在有备份的情
: 况下),打包出来的大文件会不会整个都毁了?如果根本不打包,那么出错的话,损失
: 也不会扩大到整个数据。
: tar出来的文件,如果不压缩,对文件中间出现错位、物理损坏的错容性如何?

l********k
发帖数: 14844
3
自己顶一个:afio
docstore.mik.ua/orelly/unix3/upt/ch38_05.htm
There are good arguments both for and against compression of tar archives
when making backups. The overall problem is that neither tar nor gzip is
particularly fault-tolerant, no matter how convenient they are. Although
compression using gzip can greatly reduce the amount of backup media
required to store an archive, compressing entire tar files as they are
written to floppy or tape makes the backup prone to complete loss if one
block of the archive is corrupted, say, through a media error (not uncommon
in the case of floppies and tapes). Most compression algorithms, gzip
included, depend on the coherency of data across many bytes to achieve
compression. If any data within a compressed archive is corrupt, gunzip may
not be able to uncompress the file at all, making it completely unreadable
to tar. The same applies to bzip2. It may compress things better than gzip,
but it has the same lack of fault-tolerance.
This is much worse than if the tar file were uncompressed on the tape.
Although tar doesn't provide much protection against data corruption within
an archive, if there is minimal corruption within a tar file, you can
usually recover most of the archived files with little trouble, or at least
those files up until the corruption occurs. Although far from perfect, it's
better than losing your entire backup.
A better solution would be to use an archiving tool other than tar to make
backups. There are several options available. cpio (Section 38.13) is an
archiving utility that packs files together, much like tar. However, because
of the simpler storage method used by cpio, it recovers cleanly from data
corruption in an archive. (It still doesn't handle errors well on gzipped
files.)
The best solution may be to use a tool such as afio. afio supports
multivolume backups and is similar in some respects to cpio. However, afio
includes compression and is more reliable because each individual file is
compressed. This means that if data on an archive is corrupted, the damage
can be isolated to individual files, instead of to the entire backup.
1 (共1页)
进入Linux版参与讨论
相关主题
文件合并请问有什么方法可以替代zcat和cat大家都是如何作备份的呢?
请大牛帮忙看看问题出在什么地方了。请问如何在windows下解压缩.gz文件
linux下面拷贝大量文件最有效的命令Emacs on X 显示古怪黑白框
gentoo amd64初学linux,好几个小问题。
is there any opensource c/c++ lib can extract files from .z一个读doc里文档的小问题
如何往LAN上面的server高速上传文件?求救: 计算机系统恢复
git真是耗内存啊。。。solaris的ssh为什么后台执行的时候进程不退出?
问题:关于python和web追新的Arch才能保证稳定和安全
相关话题的讨论汇总
话题: tar话题: archive话题: files话题: afio