LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   Complete Hard-Disk & Root Filesystem Backup (http://www.linuxquestions.org/questions/%2Absd-17/complete-hard-disk-and-root-filesystem-backup-384388/)

taylor_venable 11-18-2005 12:13 PM

Complete Hard-Disk & Root Filesystem Backup
 
There's been lots of grinding and clunking sounds coming from the hard-disk bays of my computer; I believe I have a dying disk. Before it fails and I lose all the hard-won data and configurations on my FreeBSD machine, I'm looking at getting a second SATA HD (or maybe an external USB or FireWire drive... do those work well under FreeBSD 6?) to use as the new primary-master disk. I'd like to do a raw copy of everything in the old disk's filesystems, onto the new one. Other than the MBR (which I can replace, of course), I want it to be as if I'd never replaced the disk at all; everything would be exactly the same. By looking through the FreeBSD Handbook, it looks like dump(8) would be the best command to do that, and I could just copy everything block-by-block from the old UFS2 filesystems onto the new disk (after creating the appropriate filesystems on the new disk, of course). But I wanted some other opinions first, from people who probably know more about this than I do. So what do you think? Is dump(8) a good way to make an exact copy of a filesystem? Or is there a better way? Or do I have the wrong idea altogether?

taylor_venable 11-18-2005 02:20 PM

Another Mirror Idea
 
I had another idea of how to do this raw copy:
Code:

dd if=/dev/olddisk of=/dev/newdisk
This might do what I want, with all the devices unmounted and from single user mode, of course. But will this command create an exact copy of "olddisk" including MBR, partition table, and superblocks? Any input is appreciated. Thanks!


All times are GMT -5. The time now is 05:31 PM.