3

I have Apache web server producing considerable amount of log files. I do logrotate them every day on the server. Every night I rsync server backups over Internet to another computer.

The speedup of log files sync is very close to 1, because logrotate renames all the files and rsync treat them as totally different, because they really are.

I guess this is common problem, what tools would you recommend me to use. I want to keep some history of logs (like 50 days) on the server and whole log history on backup. The night job should only transfer logs from last day.

Pavel Niedoba
  • 1,554
  • 2
  • 19
  • 36
  • Bump.I have a similar issue, if sticking with rsync pointers direct towards `--fuzzy` and `--checksum`, but I still need to experiment with that. I wonder why "we" did not yet find a shellscript to deal with that situation. Another advise I found was to configure logrotate to use datestamps as file extensions (and not the ones like .1.gz). – Felix Jul 02 '15 at 18:40
  • Did you manage to configure logrotate ? This could be solution for me. I still do overnight downloads fe hundred megs and growing ... – Pavel Niedoba Jul 03 '15 at 13:10

1 Answers1

3

Use the dateext option in logrotate:

Archive old versions of log files adding a daily extension like YYYYMMDD instead of simply adding a number.

Eborbob
  • 1,905
  • 1
  • 15
  • 30