T
T
tema862016-03-18 19:27:32
FreeBSD
tema86, 2016-03-18 19:27:32

Which is better for dump or dd backup?

Please tell me what is better to use from FreeBSD native tools to backup and then deploy the entire system on another server. Everywhere they write that you need to use dump, but there is also dd, but there are few manuals on this topic. Or is there any other way to backup the system?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CityCat4, 2016-03-18
@tema86

These are slightly different things. DD works at the level of FS blocks, it doesn't care about the content. They can backup flash drives, DVDs, a bald one - he just stupidly reads the block and writes the block, as ordered. Of course, it can be used for backup, but not systems, but something small - there were times, they backed up floppy disks. Of course, you can also backup the system with it - if the screws are dimensionless - because dd creates an image of exactly the same size as the partition. Well, you need to restore to exactly the same screw, which is usually unlikely. Dump / Restore works at the FS level and creates a file as output, in which there is only data. If 1Gb is occupied on a 100Gb partition, then the output file from dd will be 100Gb, and from dump - 1Gb or less.

S
Saboteur, 2016-03-18
@saboteur_kiev

dump knows what files are and will not read every byte in empty sectors. The size of the image made through the dump will be smaller (depending on the disk utilization). But for dump, you either need to mount the filesystem in readonly or shutdown and reboot so that the dump is performed outside the working system.
You can also dump online, but with all the risks of losing consistency.
dd is a byte copy. This can be of course useful, but for a long time.
dd can be done to an identical disk size, not to a smaller one. Online copying can be with a loss of file system consistency.
There is also rsync and the usual tar + gzip, both will retain the access flags, though the inodes will be different.
It is better to choose according to your situation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question