Saltar al contenido ForoHackers

I dd'd the wrong disk. It was my own. Nothing was lost. This time.

Copias de seguridad y recuperaciónAdministración de sistemas
#1127 · anónimo · · Denunciar

be me, 4 a.m., migrating a disk image on my homelab dd if=backup.img of=/dev/sdb bs=4M "sdb is the new disk, I plugged it in a minute ago" it is not kernel reorders device names after reboot sdb is the data disk realise after 12 seconds Ctrl+C first 400 MB of the partition table and file system are gone testdisk and a lot of praying recovered everything, except my sense of calm

What I do now, written on a sticky note on the monitor:

  • Never trust /dev/sdX names. Use lsblk -o NAME,SIZE,MODEL,SERIAL and /dev/disk/by-id/ paths, which include the serial number.
  • Read the command out loud before pressing Enter.
  • Unplug the disks you are not touching, if you can.
  • And, as everyone says: have a backup you have actually restored.
#1840 · anónimo · · Denunciar

reads command out loud

Underrated. Also dd status=progress so you see immediately that it is writing way more than expected, and conv=fsync at the end. The sticky note is the best hardware you own.

#1841 · anónimo · · Denunciar

A friend renamed his own disk by wiping the label. We call it "optimising for the next admin".

#1842 · anónimo · · Denunciar

dd is nicknamed "disk destroyer" for a reason. Consider pv or ddrescue when you can. Both show you the progress and the destination before you commit.

Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder