2

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?

flight
  • 384
  • 3
  • 14

2 Answers2

2

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

Thirler
  • 156
  • 1
  • 5
1

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.

Daniel Serodio
  • 249
  • 3
  • 10
dannyman
  • 358
  • 4
  • 15