5

im looking to use dd to back up my whole hard drive regularly but it takes around 1.5 hours and want to know if there is a faster way to back up.

possibly just by updating the bytes which are different.

1

2 Answers 2

3

You can backup a single LVM partition (not a whole raw disk as you mention but may still meet your requirements) by taking a snapshot of it, then doing a incremental backup of the filesystem rather than the raw disk. Once you have the snapshot, you could use incremental tar backups or rsync (recommend rsync). You dont strictly need the snapshot - or the LVM, but helps ensure you get a ~point in time filesystem image.

rsnapshot (which is basically a big wrapper on rsync to make it easier to do incremental backups) supports LVM snapshots and incremental backups. I use it to do the above. Note the first sync is still going to take a long time.

1
  • +1 for rsnapshot. rsnapshot enables you to define a backup strategy (what full and incremental backups you want to keep for how long) and uses rsync to do the actual backup. By using rsync, only the changes files are copied. rsnapshot has a lot of options that allows customisation to your need. I won't recommend using dd to backup your data. dd makes a backup of the raw data on your harddisk, which is something different than keep one (or several) copies of your data.
    – agtoever
    Sep 26, 2019 at 8:24
2

The thing is, finding out which bytes have changed will involve reading both devices and comparing each byte. Doesn't sound very fast this way either.

If you're ready to give up 'backing up the entire hard drive' and to instead do the backup at the filesystem level:
1. rsync
2. rdiff-backup

AFAIK, these programs use some attributes like modification time and size which are available at the FS level. So they should speed things up a LOT (especially if most of your files do not change)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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