Moving a Fog server to new hardware

So you've set up fog a test machine and decide you can’t live without it, or the current hardware is getting on a bit and you need to move to new hardware. Well it can be a daunting thought, especially for those who like me aren't very strong with Linux. After finally accomplishing this feat I will attempt to outline the procedure.

I will be assuming that you are running Ubuntu, you may need to change some of the code for a different distro.

Step 1: Backup your old setup

Open up a terminal and navigate to the location of the folder which you installed Fog from.

From here nav to utils folder, and then the FOGBackup folder

Here there is a script to run called FOGbackup.sh. Run this giving it a backup location.

This will back your database,images, snap-ins and reports in that order.

If you have a lot of images I would recommend editing the script first and comment out the section that backs up the images. Alternatively as long you don't need to backup any snap-ins and reports, you can cancel the script when it starts to run the image part.

Step 2: Set up your new server

At this point you need to have fog installed on your new server, and the data we backed up from step 1 copied over.

Step 3: Restore your Database

Navigate to were the database file is and run:

(This assumes your password is blank, enter after the p if you have one)

Step 4: Restore your images

Copy the contents of the images folder which is /images and place them in the /images folder on the new server.

(This is assuming that you are using the default storage and have not set up any additional)

After that you will need to change the permissions:

note: When I did my first run on the new server I got a failure to mount nfs volume error the fix is

Step 5: Restoring snap-ins and Reports

I didn't have any to restore, I will update later on when Ive had a look into it

Step 6: Additional steps

Well if you gave the new server the same ip as the old one your pretty much done. When you go to the web manager all your clients and images should be listed, and you can image until your hearts content.

If for some reason you needed to change the ip address there will be a few extra steps to take.

Enter the web manager and go to information. From there go to Fog Settings.

In here change every reference of the old ip address with the new one.

Then change option 66 in your dhcp to the ip address also, assuming that your running your dhcp on Windows.

If you receive an error about the tftp server when you try to schedule a job you will need to change the fog user password:

Then place this new password into FOG_TFTP_FTP_PASSWORD in the fog settings.