rsync 到文件的压缩存档

rjm*_*nro 12 backup rsync gzip

我使用 rsync 备份服务器,但这些备份非常大,我想压缩它们。有没有办法在 rsync 周围使用某种包装器来压缩备份中的文件,rsync 实时文件中的更改,然后在复制后立即重新 gzip 文件?

即如果 live 上的源文件是foobarbaz,则备份有foo.gzbar.gzbaz.gz

重申:我想要一端是压缩文件,另一端是未压缩文件。我不想在 rsyncing 之前进行压缩,因为即使使用 --rsyncable,它也会降低 rsync 的效率。我知道 rsync 的 -z 选项。我在备份机器上没有空间来存储所有未压缩的文件。

A B*_*A B 10

我不确定我是否理解您要做什么,但是您可以在主服务器上创建 gzip 备份,以确保它们易于 rsyncable 并且不会费心解压缩传输中的任何内容。

gzip(1)

--rsyncable
       While compressing, synchronize the output occasionally based on
       the  input.   This  increases  size by less than 1 percent most
       cases, but means that the rsync(1) program can much more  effi?
       ciently  synchronize  files  compressed with this flag.  gunzip
       cannot tell the difference between a  compressed  file  created
       with this option, and one created without it.
Run Code Online (Sandbox Code Playgroud)


rjm*_*nro 7

我认为 rsyncing 到一个安装了 fuseCompress 的文件系统可能是最好的选择。该项目的历史特别提到他们使用它改进了 rsync 的性能。

http://code.google.com/p/fusecompress/

https://github.com/tex/fusecompress/