should delete old backups, then create new / not enough space on media

Bug #913827 reported by LAZA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sbackup
Opinion
Wishlist
Unassigned

Bug Description

I often get this hint:
INFO: Die Bearbeitung des Sicherungsprofils ist fehlgeschlagen. Fehler: Für die geplante Sicherung ist nicht genügend freier Speicher im Zielverzeichnis verfügbar (frei: 156702 MiB 868 KiB, benötigt: 218058 MiB 262 KiB 78)

My time plan:
Full backup: every sunday at 23 o'clock.
Simple delete: all backups older than 20 days.

But there would be enough space if the old backups would first cleaned up/deleted and then the new backup started...

Shure should there than also an information retrieval if:
complete backup all x days
is higher than
delete old backups

Xubuntu 11.04
sbackup 0.11.4

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Thank you for using sbackup and for taking the time reporting this bug.

The order of backup creation and removal of existing snapshots was choosen by intent:
1. make a new backup
2. in case of success remove old snapshots

Reason for this is, that you don't want to end with *no* backup at all in case of errors. Image following situation: all snapshots were removed (since they are older than the specified threshold). The subsequent backup fails for whatever reason. You'd have lost all of your backups now and this is not acceptable.

I set this issue to Opinion and please feel free to add comments or elaborate on your usecase or possible solutions from user's perspective. There is room for improvements here but simply change the order of backup creation and removal is not the right solution, I think.

Thank you so much for your help.

Changed in sbackup:
status: New → Opinion
importance: Undecided → Wishlist
Revision history for this message
LAZA (laza74) wrote :

I'm COMPLETLY with you, Jean-Peer.

In my case, i got three (3) backups on an external HDD - so if the oldest removed and the actual fails i'm not naked at all! :-)
But the space for the fourth backup is sometimes a little bit to small...

This is at the moment my external drive with three backups:
/dev/sdd1 528447160 371651084 129952544 75% /media/Backup

I suggest in this case an additional question with the possibility to check (or uncheck, but opt-in seems smater) to remove one older backup before the new one is created.

So 'sbackup' should search the backup medium for older backups an only if there are more than one AND the question for deletion beforehand is checked AND the backup is older than the delete rule.

But it is not my baby, but i think this is an idea how to solve these problem without (i hope!) great chin-ups and alterations and modifications in the source code.

Thanks for taking this problem serious!

Revision history for this message
Anton (feenstra) wrote :

I would suggest a config option like 'remove older backups to free space'.

That would work great as well in combination with the 'logarithmic' cleaning, because you will only loose your oldest backup when your backup disk is (nearly) full. You might also want to add an option to 'keep at least # full backups', which will cause sbackup to fail if there really is no space left. This would prevent you from having only the latest backup left in case the new backup is unexpectedly large.

Seems like this would not be much work to implement - anyone?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.