简体   繁体   English

通过rsync增量备份单个日志文件

[英]incremental backup a single log file by rsync

I use rsync for backup my jboss server log file. 我使用rsync备份我的jboss服务器日志文件。 It is good for me. 对我有好处

but i found that when use rsync backup the log file, if log file change, all file will be transfer to backup server. 但是我发现,当使用rsync备份日志文件时,如果日志文件发生更改,所有文件都将传输到备份服务器。 the execute command like this: 执行命令是这样的:

rsync -avz --progress server.log.2015-08-30 root@10.0.172.30:/home/backup

I know rsync's incremental backup is for file list. 我知道rsync的增量备份用于文件列表。 but how to make single file like log file use incremental backup. 但是如何使单个文件(如日志文件)使用增量备份。 if the log file only add some line. 如果日志文件仅添加一些行。 only transfer the addition line. 只转移加法线。

I solved my problem. 我解决了我的问题。 I just had to use append tags. 我只需要使用附加标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM