refactured updatedb to be faster, hopefully easier to understand and to save just increments for each backup in database.