Difference between revisions of "Migrate images manually"
m (→Image files) |
(→using NFS) |
||
Line 10: | Line 10: | ||
== using NFS == | == using NFS == | ||
+ | |||
+ | '''Copying one image example:''' | ||
<pre> | <pre> | ||
Line 15: | Line 17: | ||
cp -R /mbimages/Optiplex9020UEFI /images/Optiplex9020UEFI | cp -R /mbimages/Optiplex9020UEFI /images/Optiplex9020UEFI | ||
umount <local directory> | umount <local directory> | ||
+ | </pre> | ||
+ | |||
+ | '''Copying all images to a new server before installing fog:''' | ||
+ | |||
+ | These steps are done on the fresh new server. | ||
+ | |||
+ | <pre> | ||
+ | cd / | ||
+ | mkdir /images | ||
+ | mkdir tempMount | ||
+ | mount x.x.x.x:/images /tempMount #--Where x.x.x.x is the old fog server's address. | ||
+ | cd /tempMount | ||
+ | cp -R * /images | ||
+ | umount /tempMount | ||
</pre> | </pre> | ||
Revision as of 15:09, 12 October 2016
This describes how to manually migrate an image or all images to another server.
Contents
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 Also, 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
Copying one image example:
mount x.x.x.x:/<remote directory> <local directory> cp -R /mbimages/Optiplex9020UEFI /images/Optiplex9020UEFI umount <local directory>
Copying all images to a new server before installing fog:
These steps are done on the fresh new server.
cd / mkdir /images mkdir tempMount mount x.x.x.x:/images /tempMount #--Where x.x.x.x is the old fog server's address. cd /tempMount cp -R * /images umount /tempMount
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.