Date: Mon, 3 Jan 2005 14:05:07 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: Eric F Crist <ecrist@secure-computing.net>, FreeBSD-Questions Questions <freebsd-questions@freebsd.org> Subject: Re: Backup with dd? Message-ID: <p06200702bdff41fc0fbf@[128.113.24.47]> In-Reply-To: <F3972A63-5DB0-11D9-B56F-000D9333E43C@secure-computing.net> References: <F3972A63-5DB0-11D9-B56F-000D9333E43C@secure-computing.net>
next in thread | previous in thread | raw e-mail | index | archive | help
At 11:57 AM -0600 1/3/05, Eric F Crist wrote: >Hello all, > >I've decided to try doing a complete system backup, attempting a >bit-for-bit copy. A friend told me to try the following: > ># dd if=/dev/ad4 of=/dev/ad6 > >Both drives are identical SATA150. Is this the best way? While that will probably work, it is also somewhat risky to make a direct copy of a disk that you are actively using. You can end up with a copy that has inconsistencies, because of changes that happen on the source disk during the time it takes to do a copy. And if you are copying a huge disk, it *will* take a significant amount of time to perform that copy. By "inconsistent", I mean that when you boot up on the copy, the initial 'fsck' will fail because of inconsistencies on the disk. I have done 'dd' copies like this. I have seen fsck failures... >I'm hope to be able to do a daily/weekly backup this way, and if >my primary drive fails, switch the cables and just reboot. You would be better to do the copies on a per-partition basis, and first create a UFS snapshot of each partition, and then use the snapshot as the source for your copy. I actually use a 'dump -L' command, combined with 'restore'. The -L option causes dump to automatically create the snapshot for the partition you specified. It uses the snapshot for the copy, and then destroys the snapshot when the copy has finished. This assumes you're running 5.3-stable or 6.x-current. I am not sure how well snapshots would work on 4.x-stable. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06200702bdff41fc0fbf>