User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

I noticed there are a lot of raspiBackup users who use dd as backup method. In particular users which work primarily on Windows  use dd because they can restore a dd backup on Windows with win32diskimager or equivilent tools. There is a certain risk with dd which doesn't exist with tar of rasync. That's why I suggest better to use tar or rsync .




1) dd saves a whole partition 1 to 1 on bit level. Read errors are detected and reported. But it's possible the file system has issues which happens usually when there is a power failure. This error will not be detected by dd and the partition is saved with filesystem errors without any warning or error message by dd. If this partition is restored the parition also will have the filesystem errors. Now all following backups will have this filesystem error and at some point in time when older backups will be deleted the last backup without a filesystem error will be deleted. If a restore is needed there is no backup without filesystem errors available any more. Now you have to hope there are no important files affected by the filesystem error. Otherwise the backup is unusable.

2) During a restore of a dd backup the backup is written 1 to 1 on bit level on the SD card. If this SD card has bad blocks or is otherwise partially corrupt you will not get any error messages from dd. If you now boot the restored backup you will get error messages during boot or the image will even not boot. Then raspiBackup useres will create a problem report. The root cause for the issue is a corrupted SD card but no issue with raspiBackup. I then ask the users to restore the backup on a brand new SD card and the issue is gone. These problem reports create unnecessary overhead which could be avoided when tar or rsync are used instead of dd.


And now?

It's quite easy to switch to tar. The same filesystem can be used on the backup patition. But a restore cannot be done any more with windowsprograms as Win32Diskimager or Etcher. But you can start raspiBackup on a Raspberry. If you have only one Raspberry just create a rescue SD card with raspiBackup and put it on a safe place where you can grab it when you have to restore a backup.

For rsync you need a etx2/3/4 filesystem on your backup partition which can be created on Linux. Restore also requires to run raspiBackup on a Linux box.


Further disadvantages of a dd backup

With a dd backup, the entire partition is always backed up - even if only a fraction of the partition (e.g. 33%) is used. This means that with a 64GB partition, 42GB are always backed up for nothing, the backup process unnecessarily takes 66% longer and the backup unnecessarily takes up 66% more storage space.


Which backup type do I suggest to use?

The most efficient backup method is rsync. Hardlinks allow to copy only new or modified files and thus the backup process is in general very fast. The first backup will take long because all files have to be copied. In addition the files in te backup are readable and not packed somewhere and can be accessed immediately if you just need some files from the backup. If you use tar you have to extract the files from the tar file which is not very convenient. If you use a Synology for your backups see Use Synology as backupspace.


Weiterführende Informationen

Wie funktionieren Hardlinks?

Welches Dateisystem kann auf dem Backupgerät benutzt werden?

Add comment

*** Note ***

Comments are welcome. But in order to reject spam posts please consider following rules:
  1. Comments with string http are rejected with message You have no rights to use this tag
  2. All comments are reviewed by hand and thus it usually takes one day until a comment will be published.