Restoring FOG from Backup

Restoring FOG
Restoring a FOG installation requires essentially the opposite actions as taken above. This section assumes you backed your installation up manually. This section will assume that your backup is in /opt/fog_backup. Also, you may need to be root for some of these actions.

First, go to your backup directory: # ls fogopt fog.sql web As you can see, I have named my /opt/fog into fogopt, and my /var/www/fog into web. I chose not to backup my /images directory due to some issues copying such large files.
 * 1) cd /opt/fog_backup

Web Directory
Restoring your web directory will take two steps. First, remove the current one, if it exists, then copy the backup over to the appropriate location.
 * 1) rm -rf /var/www/fog
 * 2) cp -a /opt/fog_backup/web /var/www/fog

OPT Directory
Restoring the /opt directory is just about the same as the web directory above.
 * 1) rm -rf /opt/fog
 * 2) cp -a /opt/fog_backup/fogopt /opt/fog

MySQL Databse
In order to restore the database, you should first drop the current one (if it exists), then create a blank fog database, then import your backup. Enter password: mysql> DROP DATABASE fog; mysql> CREATE DATABASE fog; mysql> exit
 * 1) mysql -u root -p
 * 1) mysql -D fog -u root -p < fog.sql

That should do it!