Moving Images

Discussion in 'General' started by Duffney, Jan 7, 2012.

  1. Duffney New Member

    How would one move the existing images off one fog install to an external device and then import them onto a new fog install?
  2. Blackout Developer

    If the second FOG server is online now, i would copy over the network.

    First log into the FOG server with the images. Then copy using 'scp' or 'rsync'.
    scp is installed by default, rsync is not. But rsync is much better..

    SCP:
    Code:
    scp -r /images/* second_fog_servers_ip:/images/
    Rsync:
    Code:
    rsync -HavP /images/* second_fog_servers_ip:/images/
    Or, to copy them to an external drive.

    Code:
    mount /dev/sdb /mnt/          # change /dev/sdb to suit your external hard drive
    cp -rav /images/* /mnt/
    Damian Jones, rixter and Duffney like this.
  3. Duffney New Member

    Thank you. I'll have to get the second server up and running and attempt this. I might also copy to an external to back it up. Do you know of any Ubuntu software that does automatic backups?
  4. rixter New Member

    Automatic to what? If you are talking external hard drive or a NAS, creating a small bash script and running it with cron is pretty easy, if you are talking tape, I don't know as I have never used tape, and for DVD, there are several CLI programs for that, again bash and cron, replace the DVD daily.
  5. Duffney New Member

    I could not get the command line to work. Said my drive wasn't in a block format. So I just copied the files via GUI like a noob. What needs to be done to restore these images to a new server?
  6. chad-bisd Community Manager

    copy the images to the /images/ folder on the new fog server. go to the web ui, setup the image definitions pointing to the named files or folders matching what you copied.

    The FOG UI/Database keeps information about the images, like what they are named, where they are located, and what operating system they correspond to. The filesystem keeps the actual image files. You have to redefine the images in FOG (webui) to match the data files you stored in /images/
  7. Duffney New Member

    Thank

    Thank you for your post. This will for sure help me transfer the images. I have them backed up the an external hard drive atm. Have not received the new server yet.. :(
  8. Todd Norcross New Member

    Chad-bisd, I've used the rsync method described by Blackout, and I used your suggestion for defining the image file. However, I still cannot use an image that was copied from one image to another. Are more files created than just the primary image file in /images? Everytime I try to use a copied image, i get the attached message. Untitled.png
  9. chad-bisd Community Manager

    If you choose the single disk resizable, you get 1 file under /images/
    If you choose the other image types, you get a folder name, and several files created undernearth representing the disks and partitions.

    You should compare the /images/ directory structures on both servers, including permissions and ownership of files. Also, make sure the rsync is complete before you try to use the image files.

Share This Page