If you download and boot one of the images I linked in my post, you'll be running from the CD (or USB drive) - you don't need to have any type of working system. You should then be able to mount the disk partition(s) on the non-working system, using the CD/USB drive, and copy your data over.hockey97 said:Ok, but for now what should I do? I have a server that I can't even run in terminal. It boots into errors. Is there anything I can use that will boot tools that will allow me to backup the config files of apache, mysql etc? I just need to backup the config files that deals with setting up apache, postfix, davcot, mysql etc. It took me 2 months in total to config everything and get it working properly. I already have multiple backups but all the back ups have the config files corrupted.
You won't need to upgrade right away - you'll be running the newest release of whatever version you install. For a production system, 9.x is probably your best bet right now (10.0 is too new). 8.x might be better if that's the version you're used to (I'm running 8.4 here).So, I need to find a way to save the config files before I do a clean new install. Once I do that I need to figure out what to upgrade too? what version I should upgrade too?
Often, via a (sometimes virtual) "forklift upgrade" - get the base system and whatever ports / packages are needed running and configured on a new server / new VM, then when everything has been tested, copy the user data over. That's where having a clean separation of "user stuff" and "system stuff" comes into play - it's a lot easier to back up an entire directory tree and restore it on the new box, rather than having to look at each file individually. It helps to have a formal plan in place, to keep track of what needs to be done and in what order. Here's a lightly-sanitized version of a file called "the big plan.txt" from a recent upgrade here:However, before all this I need to ask the question is how do many websites / server admin deal with upgrading?
How, does these organizations upgrade or do clean installs for the new OS and update the software in 2 days?
Code:
The Big Plan (X = done, o = pending):
X Changes to web sites need to be frozen and the contents of all of the stuff on old-box
copied to new-box.
X virtualhost (old-box) and new-virtualhost (new-box) swap IP addresses, flash-cutting all
web services except www.example.com, box.example.com and samplesite / samplesite2 to
the new system. Requires changes to rc.conf (and reboots) on both, and (probably) changes
to the httpd virtualhost config on both.
X www (old-box) and new-www (new-box) do the same, via the same method.
X Any changes necessary for new-box to take over as box need to be made (virtusertable,
access, etc. on new-box; remote mounts of /usr/local/src and /sysprog on all other box-
es, and so on). Also, httpd.conf on old-box / httpd-vhost.conf on new-box need to be
told the new hostnames.
X old-box and new-box swap primary IP addresses, and .226 gets renamed to "old-box" in
DNS. Re-mount remote mounts of /usr/local/src and /sysprog (using box instead of new-
box in fstab). Remote management addresses (oob.box, oob.new-box) swap and one gets
renamed to "oob.old-box" in DNS. Note that as part of this, oob.box is renumbering
from .4 to .48
At this point new-box is effectively box and the only thing running on old-box is the
samplesite / samplesite2 web page.
X edit the backup scripts on old- and new-box to have the correct hostname in both the
script name / cronjob and the name of the dumpfile. Rename the existing backup dumpfiles
so that they reflect the new reality.
X Reconfigure old-box to not run named (rc.conf / resolv.conf).
X Go through DNS configs and get rid of all old-*/new-* stuff EXCEPT old-virtualhost and
clean up any other stuff in DNS labeled "TODO".
X Deconfigure all un-necessary services (nfs, shell, ftp, yadda, yadda) on old-box.
X Remove almost all of /var/www except for what's needed to run the samplesite stuff and
to say "you're digging in the wrong place" when trying to access the main server.
X Move old-box /usr/local/src into /var/tmp/old-local-src
X Remove alias IP address for old-www (but NOT old-virtualhost) from old-box.
X Prune httpd configuration on old-box to remove all but samplesite / samplesite2, delete
SSL keys, no-longer-needed rewrites / access, etc. and restart.
X Clean up httpd.conf and children on both old-box and new-box
X Migrate old-* to new subnet allocated by Bob
X Get rid of 234.168.192.in-addr.arpa (DRAC3/XT stuff) and matching forward (example.com)
references to those addresses
X Remove the old-* stuff from DNS.
o [Eventually] Hand HJ the old-box box and a check and tell him it's time that server
gets a job and moves out.
Note that this was a bit more complex than what you'll be doing, as one set of web sites (samplesite/samplesite2 in my plan) were staying on the old system, since it was being handed to a user who is going to move it to another hosting facility.