On Tue, Jul 20, 2010 at 5:53 PM, John Van Ostrand <span dir="ltr"><<a href="mailto:john@netdirect.ca">john@netdirect.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p><font color="navy" face="Arial" size="2">
Sounds like an easy and successful operation. </font><br></p></blockquote><div>Yes, easy but time consuming, since the process had to write ~ 100GB and read them back and write them too. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p><font color="navy" face="Arial" size="2">My usual routine for this is using network transfer. It all depends on the size of data and what other faster paths of transfer exist. </font><br></p></blockquote><div>I was thinking of using rsync or cpio -p, or scp -ax, but the decision to use dump/restore is that it is the only method I know that preserves files as they are and does not modify the access time for them.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><p><font color="navy" face="Arial" size="2">I boot a live cd or a rescue CD (in Red Hat parlance) and manually partition, LVM, mkfs, and mount.</font><br>
</p></blockquote><div>Using a rescue CD is best, since the target filesystem is not active. I just took a risk here, and because only ssh is active on the newly installed server, there is not much activity on the files, so it worked well. Beware on systems having activity on the file system.<br>
<br>I forgot to mention that i shut down all daemons before creating the dump on the old server (apache, mysql, munin, nagios, nfs, samba, ...etc.)<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<p><font color="navy" face="Arial" size="2">Then I bring up the network and use ssh to transfer the files in a one shot command:<br><br>cd /mount_point_of_disk<br>ssh remote_host "cd / && tar -cvlf - . tmp usr var home boot" | tar -xvf -</font><br>
</p></blockquote><div>That works. <br><br>Using dump/restore instead of tar would be best for access times though. <br><br>Both support user@host:/file, but from a quick look at the man page, I understood that /file has to be a remote backup device (e.g. tape). Did not find a way to make it pipe to remote host where restore would suck from the same pipe. I had to proceed for the sake of time rather than keep researching this. Perhaps a simple socket would have worked. I did not test that.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><p><font color="navy" face="Arial" size="2">Then fix up the fstab and grub config and run grub-install. If a new kernel was needed I could install it before the transfer. If new drivers are needed I usually do that manually on the target server. <br>
<br>I usually forget to de-configure ethernet MAC addresses and do that manually on the console at boot. <br><br>While the target server reboots I re-IP the old server. </font><br></p></blockquote><div>Haven't rebooted/reconnected the old one yet. Need space for it and power before I can do that, then repurpose it for other work.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><p><font color="navy" face="Arial" size="2">If I'm concerned about a consistent backup I'll shut down everything but net and ssh on the old server. <br>
<br>I have only found dump/restor useful when I transfer software that uses a file's inode as part of a licensing algorithm. Using dump/restor ensures the same inodes for files. </font><br></p></blockquote><div>Good to know that trick ... <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><p><font color="navy" face="Arial" size="2"></font></p>
<p></p><hr size="2" width="100%" align="center"><br clear="all"></blockquote></div><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. -- Leonardo da Vinci<br>