FOG Project

    • Register
    • Login
    • Search
    • Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Recover Images From Storage Node.

    General
    3
    3
    813
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      royg706 last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • Wayne Workman
        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

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
        Daily Clean Installation Results:
        https://fogtesting.fogproject.us/
        FOG Reporting:
        https://fog-external-reporting-results.fogproject.us/

        1 Reply Last reply Reply Quote 1
        • george1421
          george1421 Moderator last edited by

          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

          umount /mnt
          

          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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post

          182
          Online

          10.2k
          Users

          16.3k
          Topics

          149.9k
          Posts

          Copyright © 2012-2020 FOG Project