dd
- Used for system backups
-
5 types of backup
-
System backup
: entire image (acronis, veeam, commvault, etc ) Application backup
: for a specific app (3rd party software)Database backup
: database (oracle dataguard, sql backup, etc)Filesystem backup
: filesystem copy (tar, gzip, directoris, etc)-
Disk backup or disk cloning
: Clones the disk (dd command) -
dd
primary purpose is to convert and copy files! dd
doesn't care about the size used! It copies everything (used and free memory)
dd if="src-file" of="dest-file"
dd if=/dev/sdx of=/dev/sdy # Copy disk to disk
dd if=/dev/sdx of=/data # Copy disk to directory
dd if=/dev/sdx1 of=/dev/sdy1 # Copy partition to partition
dd if=/dev/sdx1 of=/data/sdx1.img # Copy partition to file
dd if=/data/sdx1.img of=/dev/sdx1 # Restory backup from file
Ctrl+T
while dd is copying shows the progress
Copy ISO to flash drive
## List block devices
lsblk
## Unmount the partition
sudo umount /dev/sdx1
## Copy and convert files to flash drive
sudo dd \
if=input.iso \
of=/dev/sdx \
bs=4M \
conv=fdatasync \
status=progress