Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Advertise on LowEndTalk.com
Help:I need to recover my vps's from an .img file backup
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

Help:I need to recover my vps's from an .img file backup

sysamysysamy Member

Hi everyone,
.I have a dedicated server with virtualizor installed.
The drive was failing

I performed a disk clone via dd
I restored the disk clone to the new hdd

I then yum update and it corrupted 4 of my vps's
They no longer have a bootable drive

So I am trying everything to restore it.

I still have the .img backup but I am afraid that backup is corrupted and i will lose the few remaining vps I have.

Does anyone have any ideas what I can do to restore my vps's.

Comments

  • Try to open it with WinRAR or something

    "They said it's RAID 5" - geekypixal

  • If I get it open, then what?

  • deankdeank Member, Troll
    edited August 2018

    Copy files back? Did I really have to tell you that?

    There are two things that make Earth spin: Money and PMS.

  • @deank said:
    Copy files back? Did I really have to tell you that?

    It's a linux filesystem (centos) with 8 vps's So I'm not sure which files to copy. I have 4 partitions

    sda4 is the storage with the vps.

    But I cannot mount sda4 because of the filesystem.

    So, that's why I asked.

    Sorry

  • deankdeank Member, Troll

    Well, that's your problem. You can't expect us to help you with that.

    There are two things that make Earth spin: Money and PMS.

  • @deank said:
    Well, that's your problem. You can't expect us to help you with that.

    @sysamy , don't listen to this guy.

    @deank if you don't want to help or not capable to, don't be rude.

    I'm Good!

  • williewillie Member
    edited August 2018

    I think the unstated sentiment was that if OP doesn't have the skill or persistence to work through this themselves, maybe using some general advice like Vovler gave, then they need to hire someone to help them. The problem is likely to be too complicated for a Q&A format like this to yield usable step by step instructions. It might even involve serious file recovery which can get quite messy.

    While most of us don't mind answering a question or two, if the person doesnt seem to understand the answers and needs very detailed explanations and multiple iterations, what they really want is unlimited free consulting. That is not an attractive proposition to the "consultant". And anyway they are better off with live help than with forum posts.

    My own general advice: I'd try restoring the disk clone again, and booting from the restored image without first attempting apt update. Then see if you can copy the user files to another disk or computer from the running system. It wouldn't have occurred to me that Winrar can access a raw Linux disk image, but I don't really use it.

    Thanked by 1deank

    #lexit spread the word.

  • JunJun Member

    Try fdisk -l your_backup.img It will show you the partition table of your whole disk image. Your previous sda4 partition will now look something like your_backup.img4 (start_block) (end_block) ... mount your disk image with the offset being start_block * block_size, like mount -o loop,offset={offset} your_backup.img /mnt/backup_sda4. Try searching with keywords like mount disk image offset partition and I bet you will find more verbose examples. You may post the result of file your_backup.img and fdisk -l your_backup.img here if you need further help.

  • classyclassy Member
    edited August 2018

    sudo apt install kpartx

    kpartx -a disk.img

    You will get a file per partition, those can be mounted like any other partition.

  • Beyond seeing the partition table you presumably also want the actual files (mount on loopback read-only and see what you can recover).

    #lexit spread the word.

  • deankdeank Member, Troll

    See how some are trying to help him out after I acted like a total jackass?

    This is the state of humanity where they must feel justice before helping others out.

    There are two things that make Earth spin: Money and PMS.

  • Thank you everyone, I'll try the suggestions.

Sign In or Register to comment.