Remove old backups from rdiff

Remove old backups from rdiff-backup backup point – rdiff backup remove old increments

Importance of Backups in Hosting Industry

In the hosting industry, sudden failure of a hard disk can cause sleepless nights for server owners and can cause a bad reputation company as well. Also having proper remote backups is an added advantage to the customers as well and can attract some customers as well due to this. Rdiff-backup is one such tool which is having great features that every hosting owner will wish to have. 

What is Rdiff-backup

Rdiff-backup is a powerful remote backup tool that is based on python.

Rdiff-backup backs up one directory to another possibly over the network. The target directory will have a copy of the source directory but extra reverse diffs of that directory are stored in a subdirectory which will help us to recover files from long ago. In this tool, they have combined the features of mirroring and incremental backups. 

Rdiff-backup preserves subdirectories, hard links, uid/gid ownership (provided this is running as root), resource forks, modification times, permissions, etc which makes this a perfect tool for backups 

In this blog, we mainly discuss only the removal of old backups. 

How to remove old backups from rdiff-backup properly 

To remove old backups from rdiff-backup ( 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 provides the flexibility to define that time_spec value in years, months, weeks, days, hours, minutes, and seconds. Each representation is given below.

To Remove backups older than one year, use the below 

–remove-older-than 1Y 

To Remove backups older than one month, use the below 

–remove-older-than 1M 

To Remove backups older than one week, use the below 

–remove-older-than 1W

To Remove backups older than one hour, use the below 

–remove-older-than 1h 

To Remove backups older than one minute, use the below 

–remove-older-than 1m 

To Remove backups older than one second, use the below 

–remove-older-than 1s 

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.

If you are looking for a managed backup solutions we do provide Managed backups based on Dirvish and can know more about the same from this link Managed Backups
For more details regarding this backup, you can refer their link click here
We hope this information is useful in solving your problem. Nixtree offers prompt, top-class support to solve a wide range of possible server management problems or requirements.
If you are stuck, talk to our server helpdesk support experts for the best technical support on Server Management, web hosting, cPanel server management, and more.
Facebook Comments