It sounds like you're looking for a feature called Versioning, which is available in multiple online back up services.
Since you already using it, you should be happy to know that by default, Dropbox saves a history of all deleted and earlier versions of files for 30 days for all Dropbox accounts.
Assuming you are syncing your KeePass database to Dropbox weekly, that would give you up to 4 previous versions to fall back up.