Incremental Backup by detecting modified Blocks

Can anybody help with different approaches identifying modified disk blocks in a filesystem? Is there any way to get list of modified blocks on filesystem and backup them?
Modified since when?
You will likely have to resort to one of the following methods:

1. The easy method: repeatedly list all files in the file system and check if their last modified attribute has changed.
If so, hash the file block by block (SHA1 recommended) and back up the blocks that have changed.

Disadvantages of this are that the file scan can take a long time if the file metadata is no longer in the disk cache from the last scan (due to low memory, a huge file system, high disk activity, a reboot...), that you have to reread the entire file if it was touched (even if only some blocks might have changed) and that the last modified attribute is not reliable because anyone can set it to arbitrary values. One might decide that the last two are no real issues in practice.

2. The trickier method: monitor all write operations on files, like an anti-virus guard would do and schedule the changed blocks for backup.
Doing so might degrade overall file system performance slightly, but has none of the other disadvantages.
Thanks!!

I want to detct the modified backups since last backup(full or incremental)

monitoring all write operations on files will take lots of time in case there are millions of files.. In that case block level reading will be faster.. can anybody help me on that?
Topic archived. No new replies allowed.