views:

65

answers:

1

Hi All,

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 be 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!

A: 

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

Teddy
rsync is much better for this as it first cheksums the files so it's more resource effective.
Zsolt Botykai