Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

rdiff-backup is a really nice tool for backing up Linux servers.

One problem, though, is logrotation: Since rdiff-backup doesn't know how to detect renamed files, every daily backup contain a complete copy of all rotate log files.

A possible fix would be to convert the logrotate configuration to use a dateext filename scheme with static filenames (like e.g. wtmp-20110301).

I'm thinking about converting our servers to this scheme, in order to save a couple of GB per week in our backup.

Could you think of any major drawbacks of a complete conversion of logfile rotation to a dateext scheme?

share|improve this question
Tru64 did something like this and it worked out OK. There was also a symlink to the current log file. – Mark Wagner Mar 9 '11 at 20:42
up vote 1 down vote accepted

Very good question.

One thing you have to keep in mind is that dateext overwrites files if it is called twice on that same day.

I've been looking into the same, which has resulted in a relating question: Preventing logrotate's dateext from overwriting files

share|improve this answer
Thanks for mentioning a reason not to use dateext! – flight Oct 13 '11 at 14:17

Thank you for going with yyyymmdd format. Sometimes people pick values out of strftime that aren't padded with 0s which can cause problems.

The main reason log files are rotated by number is because it is easier to zap out old files with a limited range of names (1..9) . . . the only "risk" I would see is if logrotate missed a run and an old logfile was left laying around enough times you could potentially hit capacity limits on the filesystem, but if you're monitoring your disk space, you are or will be accustomed to cleaning out log directories anyway.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.