[Box Backup] Old vs Deleted files removal
Chris Wilson
boxbackup@boxbackup.org
Wed, 18 Feb 2009 23:32:20 +0000 (GMT)
Hi Pete,
On Wed, 18 Feb 2009, Peter Jalajas, GigaLock Backup Services wrote:
> Yeah, I just squashed an account by lowering the soft limit
> substantially, and found the same results, Old files went to 0 GB and
> Deleted stayed at several GB. To me, it didn't matter for that
> client, but I would guess that about equal numbers of users prefer it
> removing olds as deleteds, depending upon their situations at any
> given time.
I suspected as much, that it woulnd't be a simple matter of reversing the
priorities.
> I've always been intrigued by this issue. Chris, could you maybe please
> point me to the source code file(s) that control this? Maybe I can take
> a feeble stab at documenting the current logic anyway.
I think all the action happens in bin/bbstored/HousekeepStoreAccount.cpp.
It starts in HousekeepStoreAccount::DoHousekeeping(), but that doesn't do
much. The real action I suspect is in
HousekeepStoreAccount::ScanDirectory() which is called on the root
directory and calls itself recursively, building up a "map to count the
distance from the mark" as it goes. That's where I get lost, I don't know
what the "mark" is or what's done with this list yet.
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 |