English 中文(简体)
Backing up my database is taking too long
原标题:

On a windows mobile unit, the software I m working on relies on a sdf file as it s database. The platform that the software is targeted towards is "less than optimal" and hard resets every once and a while. In the far distant past we lost data. Now we close the database, and copy the SDF file to the SD card. If the unit gets hard reset, we restore the app (also on the sd card) and the database.

I m not concerned about the restore (just yet). The problem we have now is that doing a "backup" takes a crazy amount of time because the SDF is 7+ megs and writing to the SD card is slow slow slow.

My boss suggested we create hashes of "chunks" of the file and then write to the destination file only when a compare of the hashes is !=.

So here s the question.
How would you test if a file is changed if you can only have one copy of the file and thus can t compare it with it s original.

I m just shooting for a bit of brain storming.

问题回答

Just store your hashes of your chunks somewhere. You don t need the "backup" copy to compare to if you know what your hashes are. Obviously this creates a chicken and egg problem for at least one hash, but copying a single "chunk" is a much smaller problem.

Your proposed approach will still have performance problems though, as hashing a large file isn t going to be a pretty operation on a slow CPU powered by a battery.

I assume you don t have the granular control to keep track of the parts of the file you modify, and then update just those sections when you need to do backup?





相关问题
Backing up my database is taking too long

On a windows mobile unit, the software I m working on relies on a sdf file as it s database. The platform that the software is targeted towards is "less than optimal" and hard resets every once and a ...

Cognos LAE Backup Automation (Batch File?)

Within Cognos 7.4 security.. one would create an LAE file to export all their users... directions here... http://www.cognos-install.co.uk/articles/backups/access_manager_export_to_lae.asp Now you ...

backup SQL Server 2005 database without data

I have one stored procedure to backup the database. It will backup metadata as well as data. Is there any option to back up the database with out data. ie, back up only the schema (Empty tables). I ...

SQL Server 2008 Auto Backup

We want to have our test servers databases updated from our production server databases on a nightly basis to ensure we re developing on the most recent data. We, however, want to ensure that any fn, ...

mysql dump stops when a row is updated

When i try to get a dump of a mysql database, the dump stops when a row in it is updated. How can i prevent that? I already tried following options with no result: -f (forces continu even when error)...

热门标签