Using dd I am able to do an image backup. But I wish to do an incremental/sync backup.

With dd, I am able to create a new image file only. It is a time consuming process. I have 2TB of data in my machine.

Is there a way to do an incremental backup?


Not possible -- dd can't do an incremental backup, anymore than it can do word processing, play videos, or surf the web. dd is a software tool, (think of it like a hammer, or a wrench, or a pair of pliers), designed to do one thing, and do it well.

Incremental backups depend on metadata, specifically timestamps, and that requires a tool that can read and interpret a file system's timestamps and attributes. There are many tools that can do that, see these questions for help:

Note: Still, one might doggedly ask why can't dd only copy over the new or changed sectors and blocks. But dd is a simple kind of tool, it's not able to know what's different. Sectors and blocks have no timestamps or metadata, so there's nothing to help dd know what's new. dd can't know what's changed either, not without comparing a new block to an old block, but dd doesn't know how to compare blocks.

But suppose, for the sake of argument, dd could read a backup disk image X and compare it to the present disk Y. So let's say dd would read a block from X, then the corresponding block from Y, and compare them, and if they were the same, copy the new block to incremental backup file Z. But there's no point to that, since:

  • the purpose of the incremental backup was to save time backing up a hard drive. But with this method, dd still has to read the entirety of disk X, (plus all of backup Y), which would probably take more time.

  • even though one might correctly argue that at least such a method would save some time writing the backup file Z, and some space storing it, this would be "reinventing the wheel" since other tools already read two files and create a diff file of what's changed. Such as: bsdiff, radiff2, hexdiff, xdelta3, vbindiff, etc...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.