rsync-time-backup icon indicating copy to clipboard operation
rsync-time-backup copied to clipboard

Question: Delete old backups

Open anpfeff opened this issue 4 years ago • 4 comments

I am using this tool for quite a while. Recently, the space on my external hard drive that I use for backups has become full (my file manager says: "0B free"), so I want to delete some backups now. Since I'm not sure whether I'm deleting something important like hard links, I'd like to ask for a safe deletion concept. Let's assume that I have the following backups (contains almost the entire / directory): 2019-01-15 2019-02-15 2019-03-15 2019-04-15 2019-05-15 2019-06-15 2019-07-15 2019-08-15 2019-09-15

Can I now delete, for example, 2019-03-15, 2019-05-15, and 2019-07-15 in a safe way with e.g. rm -rf? If not, what would you suggest to free up some disk space?

Thank you in advance!

anpfeff avatar Sep 28 '19 10:09 anpfeff

The script should normally auto-delete old backups based on a special algorithm - it's not doing this?

Otherwise, yes you can delete any of these safely with rm -rf. The system keeps a counter of each hard link and as long as that counter is 1 or above, it will keep a copy of the base file, regardless of its location.

laurent22 avatar Sep 28 '19 10:09 laurent22

rm -rf is right. The way how hard links work makes it safe to delete any past backup - as long as you keep the latest one all will perfectly fine.

rsync-time-backup has also option to take care of it itself - if there is no space left it can start deleting oldest backups in order to create space for new one (I thought it does it by default - check documentation)

On 28 Sep 2019, at 11:44, anpfeff [email protected] wrote:

I am using this tool for quite a while. Recently, the space on my external hard drive that I use for backups has become full (my file manager says: "0B free"), so I want to delete some backups now. Since I'm not sure whether I'm deleting something important like hard links, I'd like to ask for a safe deletion concept. Let's assume that I have the following backups (contains almost the entire / directory): 2019-01-15 2019-02-15 2019-03-15 2019-04-15 2019-05-15 2019-06-15 2019-07-15 2019-08-15 2019-09-15

Can I now delete, for example, 2019-03-15, 2019-05-15, and 2019-07-15 in a safe way with e.g. rm -rf? If not, what would you suggest to free up some disk space?

Thank you in advance!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/laurent22/rsync-time-backup/issues/169?email_source=notifications&email_token=ADXJHOTHO63324B6BG5CJ63QL4YSPA5CNFSM4I3NVPI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HOJVO2Q, or mute the thread https://github.com/notifications/unsubscribe-auth/ADXJHOVWHLPA7DL4VIVTOKTQL4YSPANCNFSM4I3NVPIQ.

kapitainsky avatar Sep 28 '19 10:09 kapitainsky

Should that issue not be closed ?

fthiery avatar Apr 29 '20 17:04 fthiery

I have observed something similar in my case. The hard disk fills up when multiple scripts are running. Then the delete is slower than rsync writes the new data. (My) solution is then only the hard way: reboot and then manually delete or kill rsync.

laborb-sb avatar Jan 14 '21 16:01 laborb-sb