
|
View Full Version : Recovery
payam 04-18-2002, 06:06 AM I am a new member to this nice forum. The reason why I landed here is that I have a big problem: We had 1 raq4r here and are hosting a dozain sites. We had a problem with electricity in our building and even with the presence of an UPS, the power supply of the raq has burnt off, and 1 of the hard disks acts strange because impossible to restore it with Cobalt restore CD.
We have bought another raq4r, and received 1 replacement from SUN. But Sites are still running on the same raq with ONLY 1 HDD, the naught one has been removed, and I've only replaced the power supply in it. That was for history now please tell me:
1)what would you do in this situattion?
2)should I set up a backup system(as in the forum)
3)redo everything manually(reinstalling MySql, PHP, virtual sites.....)
4)What are the possibilities now with 2 identical Raq4r?
Please help me, otherwise I really think I would take the soution N°3, reinstalling everything....
Just note also that I am not a guru, but would like,one day, to become someone like Brandon
Best regards
Payam
FiberOptic 04-18-2002, 08:18 AM I don't think you can choose...
If you want to setup your new RaQ4r, you'll have to install every software package manually, and then move each site from your old to your new one.
You can use the Cobalt Migration Ulility to backup all virtual sites settings, and restore them using that same application to your new one.
Once you replaced your sites, you can change DNS settings to the IP of the new RaQ4r.
The crashed HD can be replaced using any new.
Cobalt uses Seagate 5400RPM 30-40GB HD.
Greetz,
FiberOptic
payam 04-18-2002, 08:32 AM Thanks a lot. But I am still a bit worried about using the migration utility of SUN. What happens if , put it this way, the configuration is slightly different on the target server, different version of MySql, PhP or simply the security or system packages?????
Can I do this migration site by site? I know they(Sun) propose this option, but is it really the same as a whole migration???
FiberOptic 04-18-2002, 08:41 AM If I were you, I wouldn't do a complete restore, but manually each site...
The versions of the packages don't interfere with the CMU utility since de CMU utility doesn't backup any MySQL databases I think :(
But...
Can't you do this:
- Remove one of the HD's of your new RAQ
- Insert the old working HD of your ither RaQ into your new one
- Power on and wait...
Since it's a RaQ4r, the RaQ will copy all the data of your first (old) HD to your new one due to RAID 1.
So, you have now one working RaQ whitout having to restore or backup virual domains, Databases, Packages,...
Now, put the new HD wich came out of your new RaQ4r to your old RaQ4r, so you have a clean system...
Now you have this:
- A new RaQ4r containing one old HD, no user looses information
- An Old Raq4r, containing one old and one new HD...
payam 04-18-2002, 09:03 AM This is exactly my first idea. BUT...............
Since I saw the damage on my second HDD, I am not feeling well about the raq4r mirroring. What will happen if the raid fails... Actually this was the whole reason I wanted to find a way to have a backup for. That's why I came to this forum.
But your feedback will support me to, at least, give it a try with another HDD(remember that we bought a raq4r, so we have 3 here, 2 working + 1 without power supply)
This other HDD contains some new packages that I'd started to install. The HDDs in replacement raq contain only "fresh factory" settings.
So I take one of these HDDs out of the replacement raq and swap it with the added packages HDD, and see how the mirroring goes by.
Before doing this, could you please tell me(confirm!!!) if the drawing in the raq manual (instructions book)showing which HDD is the primary and which one is the secondary is actually an exact drawing.............
Because to get the HDD(the one with all my sites on) to work properly (as single HDD=no raid), I had to change its place. I mean that the cable(vertical connector on circuit), which SUN pretends is for connecting the primary is not used AND it is the other cable(horizontan on circuit) which is being used now.
So maybe now you understand my fear to let the raq do the mirroring. So basically My worry is:
Which HDD copies on the other one? or which HDD is being copied on??
Cheers!!!!!!!!!!
FiberOptic 04-18-2002, 11:46 AM Well...
I CAN NOT confirm that the picture in the manual is exactly right BUT...
What I would do ...just thinking logical:
RAID will COPY all contents from a drive when a NEW HD is added to a RaQ.
What is a new HD?
A harddisk without files, even without partitions.
-so-
You can REMOVE ALL CONTENTS, P A R T I T I O N S, ... of the new drive.
That way, at my opinion, should you be able to use the RAID mirror whithout having the risk of loosing contents of the old drive... in any place the old HD is placed in the RaQ.
-but-
To be sure, I would place them as written in the manual (old disk containing all files as primary master).
The new disk will contain after mirroring has completed an exact copy of the old drive:
- Partitions
- Files
- pkg's,.....
So, begin by the new drive
:uzi: Partitions :smash:
:flamethr: Files
....
b
babak 06-11-2002, 09:19 AM Hi
chek this out, it works great for me.
Regards,
Babak
In a nutshell... The system utilizes ftpbackup and a perl script run via cron.
1) You will need to install ftpbackup on your server... follow the following instructions:
- telnet into the server as admin
- gain root access, type su - and enter your root password
- type wget http://netsw.org/net/ip/filetrans/f...ckup-2.1.tar.gz
- type tar zxvf ftpbackup-2.1.tar.gz
- type cd ftpbackup-2.1
- type make
- type make install
2) Now that we have ftpbackup installed on the server, we need to setup the script that makes the magic...
- telnet into the server as admin
- gain root access, type su - and enter your root password
- type pico -w backup.pl
- copy the script below, and paste it into the telnet window
#!/usr/bin/perl
#FTP Server Information here
$ftps = "server name here";
$ftpu = "username here";
$ftpp = "password here";
$serv = "server name";
system("/bin/tar cfp - /home | gzip | /usr/local/bin/ftpbackup -h $ftps -u $ftpu -p $ftpp -b $serv-home.tar.gz");
system("/bin/tar cfp - /etc | gzip | /usr/local/bin/ftpbackup -h $ftps -u $ftpu -p $ftpp -b $serv-etc.tar.gz");
system("/bin/tar cfp - /var | gzip | /usr/local/bin/ftpbackup -h $ftps -u $ftpu -p $ftpp -b $serv-var.tar.gz");
system("/bin/tar cfp - /usr/admserv | gzip | /usr/local/bin/ftpbackup -h $ftps -u $ftpu -p $ftpp -b $serv-admserv.tar.gz");
system("/bin/tar cfp - /usr/local | gzip | /usr/local/bin/ftpbackup -h $ftps -u $ftpu -p $ftpp -b $serv-local.tar.gz");
-edit the "FTP Server Information here" variables to match your own (server name is the hostname or IP address of the ftp address where the files will be stored, username and password are for the ftp server, and server name is simply away of naming the files, ex: server1)
- exit pico hold Control-X
- answer yes to save changes
- type chmod 755 backup.pl
3) Now we need to put the back up script in the appropriate place.
If you would like the backup script to run daily, do this:
- type mv backup.pl /etc/cron.daily/backup.pl
If you would like the backup script to run weekly, do this:
- type mv backup.pl /etc/cron.weekly/backup.pl
If you would like the backup script to run monthly, do this:
- type mv backup.pl /etc/cron.monthly/backup.pl
4) You're done! The script should now run each day, week, month depending on which one you choose.
How do you restore it? Can't forget the other half of the deal...
Go into the new box you want to restore the data to... Hopefully this is the same box that you backed up from, I believe that it will have to be the same kind (ex, RaQ3 instead of RaQ4).
Upload your five files to /home/sites/home/users/admin, and then follow the following instructions as root. Please replace $serv with the one you used.
cd /home
tar xvf /home/sites/home/users/admin/$serv-home.tar.gz
cd /etc
tar xvf /home/sites/home/users/admin/$serv-etc.tar.gz
cd /var
tar xvf /home/sites/home/users/admin/$serv-var.tar.gz
cd /usr/admserv
tar xvf /home/sites/home/users/admin/$serv-admserv.tar.gz
cd /usr/local
tar xvf /home/sites/home/users/admin/$serv-local.tar.gz
Go to the web interface using the password from the old box. Select "maintenance" and then "reboot." Reboot the system and you're done.
GregD 06-13-2002, 06:27 PM I have used FTP backup to backup up the important directories, but when I try to restore it hangs my RaQ 4i. Can anyone help me with this? email me at gregd@iqnection.com
troff 07-24-2002, 12:06 AM Interesting! But does this also restore the site settings, user and other Raq stuff (e.g. packages installed) for you too?
Has anyone tried this (except the unfortunate fellow above)?
Thanks in advance.
|