To remove old backups from rdiff-backups ( so called increments ), you can use “–remove-older-than” option of rdiff-backup command. You should have to specify the “time from which” value as well along with that switch. The rdiff-backup tool provide the flexibility to define that time_spec value in years, months, weeks, days, hours, minutes and seconds. Each representations are given below.
–remove-older-than 1Y – Remove backups older than one year
–remove-older-than 1M – Remove backups older than one month
–remove-older-than 1W – Remove backups older than one week
–remove-older-than 1h – Remove backups older than one hour
–remove-older-than 1m – Remove backups older than one minute
–remove-older-than 1s – Remove backups older than one second
The entire command to remove backups ( increments ) should look like following
rdiff-backup –force –remove-older-than 15W /backup/
Here /backup/ where you keep your rdiff-backup. Make sure to provide the exact backup directory; you cannot pass increments directory path directly to this command. It will select the respective increments to remove, based on the time spam given.