----- Original Message ----- From: "Lonnie Abelbeck" <[EMAIL PROTECTED]> To: "Discussion of AstLinux - Asterisk on Compact Flash" <[EMAIL PROTECTED]> Sent: Monday, January 23, 2006 9:45 AM Subject: Re: [Astlinux-users] How to clone a CF card
> Enzo, > > Thanks for addressing this issue. I want to make a backup net4801 box. > > I am using a net4801 with /mnt/opt and /mnt/kd on a three partition CF, > /dev/hda1, /dev/hda2 and /dev/hda3. > > You say I MUST make /dev/hda3 read-only like hda1 and hda2. Yes, or else the filesystem could be modified during the copying process, and the destination would get a corrupted IMAGE. > If I > understand you (say my AstLinux box has a dns of "voip"), and my local > Unix box (Mac OS X) has a prompt of "UNIX $". > > --------------------------- > UNIX $ ssh [EMAIL PROTECTED] > Password: > voip # asterisk -r "stop now" > voip # mount -o ro,remount /mnt/kd > > UNIX $ ssh [EMAIL PROTECTED] "dd if=/dev/hda" >/tmp/image > Password: > UNIX $ sync > > voip # reboot > ------------------------- > > Is this correct? Yes. The "sync" command ensures that the disk buffers get properly flushed, and would be useful especially on the Astlinux side: UNIX $ ssh [EMAIL PROTECTED] "dd if=/dev/hda; sync" >/tmp/image > If I then "cat" (UNIX $ cat /tmp/image >/dev/disk1) this image to a new > CF of the same size, ...then "flush"... :-) > inset it into a DIFFERENT net4801, do I need to > change anything? Will the /mnt/kd/ssh folder need to be changed? I'd say not, unless you want to change the private key of the host (probably a wise thing to do). In that case just remove /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key , and they should be recreated. (This only in case in recent versions they have been made non-volatile: in older releases, like the 0.2.8, the whole /etc/ssh was symlinked to /tmp/etc/ssh and the keys were automatically destroyed powering off the machine, so there was no need of deleting them manually). Enzo _______________________________________________ Astlinux-users mailing list [email protected] http://lists.kriscompanies.com/mailman/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to [EMAIL PROTECTED]
