Difference between revisions of "Migrate images manually"

From FOG Project
Jump to: navigation, search
(Created page with "This describes how to manually migrate an image or all images to another server. = Image files = Below, are many options for migrating an individual image. If you wanted to...")
 
Line 3: Line 3:
 
= Image files =
 
= Image files =
  
Below, are many options for migrating an individual image. If you wanted to migrate all images, just change the source/destination paths in the below commands to <font color="red">/images</font>
+
Below, are many options for migrating an individual image. If you wanted to migrate all images, just change the source/destination paths in the below commands to <font color="red">/images</font> Where you see x.x.x.x, this is the old storage node's IP address. These commands are written to be run on the new storage node.
  
 
using lftp:
 
using lftp:
lftp -c 'open x.x.x.x; user UserGoesHere PasswordHere; mirror -e /images/TheImagePath /images/TheImagePath; quit'
+
 
 +
<pre>lftp -c 'open x.x.x.x; user UserGoesHere PasswordHere; mirror -e /images/TheImagePath /images/TheImagePath; quit'</pre>
  
 
using NFS:
 
using NFS:
 +
 +
<pre>
 
mount x.x.x.x:/<remote directory> <local directory>
 
mount x.x.x.x:/<remote directory> <local directory>
 
cp -R /mbimages/Optiplex9020UEFI /images/Optiplex9020UEFI
 
cp -R /mbimages/Optiplex9020UEFI /images/Optiplex9020UEFI
 
umount <local directory>
 
umount <local directory>
 +
</pre>
  
 
Using Samba:
 
Using Samba:
 +
 +
<pre>
 
mkdir /tempMount
 
mkdir /tempMount
 
mount -t cifs //x.x.x.x/ShareNameGoesHere /tempMount -o username=YourUsernameGoesHere -o password=YourPasswordGoesHere,noexec
 
mount -t cifs //x.x.x.x/ShareNameGoesHere /tempMount -o username=YourUsernameGoesHere -o password=YourPasswordGoesHere,noexec
 
cp -r /tempMount/ImageNameHere /images/ImageNameHere
 
cp -r /tempMount/ImageNameHere /images/ImageNameHere
 
umount /tempMount
 
umount /tempMount
 +
</pre>
  
 
using SCP:
 
using SCP:
scp -r /images/ImageNameHere root@x.x.x.x:/images/ImageNameHere
+
 
 +
<pre>scp -r /images/ImageNameHere root@x.x.x.x:/images/ImageNameHere</pre>
  
 
using rsync:
 
using rsync:
 +
 +
<pre>
 
rsync -a /images/ImageNameHere root@x.x.x.x:/images/ImageNameHere
 
rsync -a /images/ImageNameHere root@x.x.x.x:/images/ImageNameHere
 +
</pre>
  
 
= Image Definitions =
 
= Image Definitions =

Revision as of 18:25, 11 June 2016

This describes how to manually migrate an image or all images to another server.

Image files

Below, are many options for migrating an individual image. If you wanted to migrate all images, just change the source/destination paths in the below commands to /images Where you see x.x.x.x, this is the old storage node's IP address. These commands are written to be run on the new storage node.

using lftp:

lftp -c 'open x.x.x.x; user UserGoesHere PasswordHere; mirror -e /images/TheImagePath /images/TheImagePath; quit'

using NFS:

mount x.x.x.x:/<remote directory> <local directory>
cp -R /mbimages/Optiplex9020UEFI /images/Optiplex9020UEFI
umount <local directory>

Using Samba:

mkdir /tempMount
mount -t cifs //x.x.x.x/ShareNameGoesHere /tempMount -o username=YourUsernameGoesHere -o password=YourPasswordGoesHere,noexec
cp -r /tempMount/ImageNameHere /images/ImageNameHere
umount /tempMount

using SCP:

scp -r /images/ImageNameHere root@x.x.x.x:/images/ImageNameHere

using rsync:

rsync -a /images/ImageNameHere root@x.x.x.x:/images/ImageNameHere

Image Definitions

Image definitions are what's stored in the database, and what is displayed in the web interface. There are DB entries for each image. Image definitions do not automatically appear just because the image files are present on the storage node, this is a common misconception.

You may recreate these manually, but you must recreate them exactly as they were on the old server. The image path must be exact and is case sensitive, the image OS and image type must be set exactly as in the old server as well.

The easiest option is to use FOG's export/import feature inside of Image Management.