Recover Images From Storage Node.
I am running a regular Fog server and a storage node. I’ve had to rebuild my FOG server. What is the easiest way to repopulate my FOG server with my old images that i have stored on my storage node?
Wayne Workman last edited by Wayne Workman
George’s steps will absolutely work - because George is just that kind of guy. His stuff works. I am so sure of this that I didn’t even read what he wrote - I just assume he’s correct.
But I’ve faced this exact problem before and I solved it by adding the storage node as the master to my new server’s default group. This way replication goes from the old storage node -> New server. I let that run and sync - and after it was done I removed master from the old node and applied master to the new one. Of course image definitions must exist on the new server for this to happen - you have to recreate these either way.
Related article: https://wiki.fogproject.org/wiki/index.php?title=Replication
First of all don’t let the replicator run. I don’t know this for sure, but I might guess it may remove the images from your storage node since they don’t exist on the master node.
Now on to getting your images back.
The easiest way is to log into the fog server console as root. Then mount the storage node share and copy the files back to the FOG server. The last step will be to manually recreate your image definitions in the web gui interface.
So the first step is to get your images back to the fog server.
cd / mount -t nfs <storage_node_ip>:/images /mnt
Now copy the images back to the fog server.
cp -r /mnt/* /images
Once the images have copied we need to disconnect from the storage server share
The last bit is going to be a little harder.
Via the web management interface you will need to create an image definition for each image you copied back from the storage node. Make sure the image name matches exactly how it appears in the /images directory.