Backing up images



  • We have a server that is starting to run out of drive space. My question, if I copy an image file off the server onto an external HD and later want to copy it back when I need to use it, is there a way to do this?

    I tried to do this, but the restored image comes up with a 0 kb size and is unable to be used.

    I will admit, I am not much of a linux guy, and probably doing this all wrong but trying to learn…

    Steps I have taken to backup image:

    1. Copied image off server to external HD using WinSCP
    2. Deleted the image in fog
    3. rm -rf /images/image directory

    Steps I did to try and restore the image:

    1. Copied image back to /images/image directory
    2. Created the image in fog
    3. Tried using the image… no go

    then

    1. Created the image in fog
    2. Copied image back to /images/image directory
    3. Tried using the image… no go

    Is this even possible or what am I doing wrong??

    Thanks


  • Developer

    @Aaron-McLaughlin said in Backing up images:

    I tried to do this, but the restored image comes up with a 0 kb size and is unable to be used.

    You see the 0 kb size because when re-creating the image definition in the FOG webUI we simply don’t know the size as it is only being recorded when capturing the image.

    You are saying the the image cannot be used after copying it back. This can be for various reasons.

    • File access rights (chmod -R 777 /images/imagename)
    • Path name (Linux is case sensitive, so ImageName is not equal to imagename)
    • Image definition (make sure the new definition does match the old one - resizable/non-resizable, compression method

    In some cases the error on screen can shed a light on what is wrong with the image. So please take a picture of the error and post here.

    Next time: Don’t touch the image definition in the web UI. Just move images to an external disk to get some space and let the definition alone. After moving it back you don’t have issues with the image definition.



  • @Aaron-McLaughlin try to not remove the image definition, just copy it and delte the image files and let the image definition alive, if you now copy the files back it should work.

    Fog doesbt know that the image was still captured if you copy image files back and simply recreate the image definition.

    Not sure but if you want the backup and restore images you also have to backup the sql part of the image, that should cover all the image settings and maybe also file sizes.

    Regards X23


 

529
Online

41.9k
Users

12.4k
Topics

116.7k
Posts