[Box Backup] keeping files 28 days patch

Chris Wilson boxbackup@boxbackup.org
Thu, 9 Jul 2009 20:08:33 +0100 (BST)


Hi Torsten,

On Thu, 9 Jul 2009, Torsten wrote:

> i build a very little patch that only deletes files from store that are 
> old or deleted and more than 28 days old. So files less that 28 days old 
> are kept.
>
> I think such a feature is important for Box Backup but i do not 
> unterstand it completely.

Yes, I think it's a good idea, at least in the mean time until snapshots 
are fully implemented and the client can control how much history is kept 
on the store.

> - I think this patch generates a new class of file that i do not have a
>   name for. Old and deleted but securely saved.

I don't think it's really  anew class of file, it's just a change to how 
housekeeping removes old files.

> The known old and deleted perhaps saved, because they are deleted if 
> soft limit reached. Should there be new names for the new files? I do 
> not know how other online backup solutions solve this.

I don't know either, but I suspect that most of them use snapshots. E.g. 
rdiff-backup does.

> - So the new soft limit should be calculated from actual data and secure
>   old and deleted files. How could this be done?

Why do we need a new soft limit? Either housekeeping can bring the store 
under the soft limit or it cannot (because all old files are newer than 28 
days). It makes no difference to the client, which will keep uploading 
files until it hits the hard limit and then stop.

> - Is there a way for the client to tell the server how long to keep the
>   files?

Not at the moment, only to mark files to be deleted immediately.

> Any annotations or ideas?

As this patch is implemented, it's a global option at compile time, and 
can't be set per account. Making it configurable at runtime would be 
useful. Making it configurable per account would probably require a change 
to the account info file format, and I'm reluctant to do that as it would 
break forwards compatibility at least, and I think snapshots are a better 
way to implement this in the long run. But I'm seriously considering 
applying your patch.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |