开发者

Rsync create new file on file size change

I need to backup (for debugging) some temporary files meanwhile a program running. I used to do it with rsync-ing the /var/tmp/someprogram directory with find . -iname 'blahblah' -exec rsync -someoptions $DESTdir, which works wonderful.

Except the case of someone in some program (for which I don't have source code access, and never will have - sad, and long story starting with COBOL...) overwrites the temporary file with new content from within the some program.

E.g.

  1. Starting PROG program
  2. This creates a B1237 file in the tmp dir (and I'm rsyncing in every few minutes)
  3. After the PROG finishes the processing of B123 it starts another cycle and recreates B1237 with new content, and the rsync-ed file will be overwritten. And I need the first version as well.

Is it possible in an easy way? I was thinking about timestapped gzipping of the DEST dir, but there should b开发者_运维技巧e another way (without creating a (e.g.) git repo in the dest dir, and commiting after syncing...

Update: I did not mention - sorry - that I don't have the rights to install anything on this SLES9 (corporate) server.

Thanks in advance!


In case you want to do something more space-efficient than cp --archive, you might want to look at faubackup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜