Best way to move FOG from dead system
Long story short, something happened to the CentOS installation of my main FOG server, and my backups are no good. Can’t boot, but the data is still there. Rather than try and figure out what the hell happened to the kernel, I’m just going to reinstall FOG on a different machine and move the data there (I can still get into the HDD from a live linux disk).
I know that I should copy my .fogsettings file so the installer sets up everything the same, and copy my images, obviously.
However, I’m trying to figure out the best way to move the MySQL DB. Given that I can’t boot up the system, how I can I best move the DB to the new system?
I read in a couple places you can copy /var/lib/mysql once MySQL is installed, but I would want a second opinion before I move forward.
@Sebastian-Roth Oh, I’m silly. You are correct. That page returns:
I can confirm that the interface is set correct in storage nodes for this server, if that’s related.
One issue I noticed is the bandwidth graph is gone on the home page. The http://fogserver/status/bandwidth.php page seems to be missing.
Shouldn’t that be http://fogserver/
@Tom-Elliott That did the trick! FOG is installed again and running fine again.
One issue I noticed is the bandwidth graph is gone on the home page. The
http://fogserver/status/bandwidth.phppage seems to be missing.
@moses I would say install mysql manually, stop mysql service, copy over the old /var/lib/mysql, start the service.
If you had any special things from the mysql config before, copy over the old (/etc/mysql/my.cnf – debian based, or /etc/my.cnf – redhat based) to the new as well before starting the service.
@moses take the HDD out and try it in another system.
@Wayne-Workman The HDD is good, but none of the old kernels or the recovery kernel work. It hangs on boot indefinitely.
I agree with Tom, I’ve been thinking about this thread since you posted.
There could be a lot of things you could do, or none. If the HDD bit the dust, you are out of luck. If it’s a simple kernel issue due to updating, all you have to do is pick the old kernel when the system is booting. You can also boot into recovery mode and maybe check free space.
There is no replacement for many backups. I keep snapshots, manual copies of my images, many copies of my database, and I try to hold onto the built-in backups that FOG Trunk makes as well.
@Tom-Elliott Should I copy /var/lib/mysql/ to the new system before or after FOG is installed there? I’m assuming after.
@moses well, you can copy the /var/lib/mysql and place it on your system.
You won’t have to do anything special really.
Just copy the image, /opt/fog, /var/lib/mysql, and rerun the installer (to make sure things are somewhat fresher and more stable I suppose).
That means you don’t have to do any other work as the mysql will still be there.
@Tom-Elliott I had a feeling that would be the case. Thankfully, it’s not in production yet, so I’ll just have to re-add my storage nodes. Thanks anyway
Depends on how the system “crashed and burned”. I’d say, in your case, you really don’t have any options.