[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Backup again!
- Subject: RE: [cobalt-users] Backup again!
- From: Carrie Bartkowiak <ravencarrie@xxxxxxxx>
- Date: Tue Jul 31 11:04:05 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Tue, 31 Jul 2001 15:43:29 +0100, Gavin Nelmes-Crocker mumbled
something like:
>>The best solution currently for backup is to use the CMU and then
>>tar up the
>>resulting directory and ftp it somewhere else. Your method will
>>backup data
>>but not all the database entries, passwords etc required.
Gavin I disagree. Here's why:
When you use the CMU utility, it does *not* put the sites back in the
same place that they were. For example, if www.foobar.com was in
folder /home/site16 before, it won't be site16 once the CMU gets done
- it will be some other folder.
Then when you restore the sites using your big tar file, you're going
to be putting the wrong domain's files into the new/current site16
folder.
I still think this is the best way (takes a while, but certainly not
5 days - more like 5 hours):
1. Get a listing of all sites and what folders they're in by doing ls
-la /home/sites. Print this out or write it down.
2. Make a text file with the domains listed one per line *in the
order that they are incrementally in your /home/sites listing.
So if site1 is foobar.com, site2 is widgets.com, and site3 is
somedomain.com, then your file would look like:
www.foobar.com
www.widgets.com
www.somedomain.com
If you *really* want to save yourself some time, you can read the
instructions for the shell tools and turn each of these lines into a
comma-delimited set of settings for each site. Meg size, number of
users, web aliases, ftp enabled or not, ssl enabled or not, etc.
3. Use a little perl script to parse this file and send the domains
(and their accompanying settings, if any) to the Shell Tools. The
Shell Tools will automatically add the domains with all of the
settings you specify, and the domains WILL show up in the GUI.
This takes mere SECONDS, not hours as it would if you did it by hand
through the GUI.
4. Go through the GUI and write down/type each user's settings. What
site they belong to, username, alias, forwards, site administrator or
not, alloted space, etc. etc. etc. This takes a while, and is usually
best to have someone helping you (you start at the top of the list,
they start at the bottom, meet in the middle!).
5. Make another text file with each user's info - one per line - and
again make a little script that will send this info to the Shell
Tools(use a generic password for all users, as you'll change this
later). Again, the shell tools will add the users and they'll show up
in the GUI. And it takes SECONDS.
5. Now you can go in and untar your big backup tar file, or if you
are more conservative and careful (like I am), untar each site's
individual tar file. Check it after untarring and make sure
everything is owned/grouped properly, etc.
6. Take the passwords from the old machine's /etc/shadow and
/etc/shadow - files and copy them into the new machine's /etc/shadow
and /etc/shadow - file. Now your users have all of their old
passwords.
Now your sites and users are all restored, and all you need do is
finish tweaking the server's settings to your tastes.
The fact that the CMU changes the /home/sites/siteX directory for all
of the sites is a huge bumble. Any hard-coded paths in CGI scripts
are now wrong. A huge backup tar file of /home/sites has all of the
sites in the wrong place, belonging to the wrong folder, and you'll
spend forever moving them into the correct places and hoping you
didn't miss anything, then chowning/chgrping them back to the proper
user/group since you've got to move them as root and that tends to
screw up ownership permissions...
Just become very familiar with the Shell Tools, and you'll be doing a
lot LESS work when you have to migrate or backup.
--
CarrieB
"I do believe that where there is a choice only between cowardice and
violence, I would advise violence." --Mahatma Ghandi