Virtual box data recovery

Discussions related to using VirtualBox on Linux hosts.
Post Reply
kamlesh
Posts: 4
Joined: 28. Mar 2016, 10:01

Virtual box data recovery

Post by kamlesh »

Dear all,

I am using centos virtual box (for running cadence software) on my host machine which has centos again as OS. I got gnome and server configuration related errors for both my virtual machine and host machine. When I tried taking the back up of my data on external hard disk, the size of .vdi reduced from 74GB to few KBs. I want to know can the .vdi file be recovered back and hence all data present on virtual box be retrieved.

Thanks,
Kamlesh
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual box data recovery

Post by mpack »

What does "tried taking a backup" mean? And what file format does the external hard disk use?

VirtualBox has no backup features for virtual media. You use the host OS to make backups, and if the data is important I suggest that you back up the whole VM, often. Once the data is gone, it is gone.

Whether your data is gone right now or not, I have no way to know. You should run a filesystem check on the host OS (check your host OS documentation for how), and then you'll see if you can then copy the VM files correctly. It's also possible (with the data given so far) that you made a total noob mistake such as trying to copy a multi GB file to a FAT formatted disk, meaning there's nothing wrong with the source data at all.
kamlesh
Posts: 4
Joined: 28. Mar 2016, 10:01

Re: Virtual box data recovery

Post by kamlesh »

1. What does "tried taking a backup" mean? And what file format does the external hard disk use?

I was trying to run rcp command to copy whole virtual box setup on my hard disk. The hard disk is in FAT format and hence I tried copying it in partition.

2. You should run a filesystem check on the host OS (check your host OS documentation for how), and then you'll see if you can then copy the VM files correctly.

I will check about this.

Can I get my .vdi file repair?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual box data recovery

Post by mpack »

FAT has a 4GB maximum file size. You can't store files larger than that on a FAT formatted drive.
kamlesh wrote:Can I get my .vdi file repair?
I don't understand the question. Regardless of the state of the VDI file on the external hard drive, you still have the original file it was copied from. If you do not then no, there is no way to recover the lost data.
kamlesh
Posts: 4
Joined: 28. Mar 2016, 10:01

Re: Virtual box data recovery

Post by kamlesh »

The original .vdi size got modified from 74GB to 7GB and then finally to few KBs, when I tried opening the Virtual Box. I had some gnome related problem on my virtual machine initially. would filesystem repair option help me in this situation? ( I am new to linux systems and hardly have any knowledge of it)
kamlesh
Posts: 4
Joined: 28. Mar 2016, 10:01

Re: Virtual box data recovery

Post by kamlesh »

Can I restore my system to some previous state and retrieve .vdi file?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual box data recovery

Post by mpack »

Well, copying a file to an external hd certainly doesn't corrupt the source file. If your host OS is corrupted then that is beyond the remit of these forums. I don't use a Linux host myself so I can't offer advice on how best to recover damaged files. I can tell you that on Windows hosts your chances of repairing damaged files on a corrupted host filesystem is almost zero for very large files (say: larger than a few dozen megabytes).
kamlesh wrote:Can I restore my system to some previous state and retrieve .vdi file?
I'm afraid there is no magic here: if you lose your file and don't have a backup then... you lose your file. If that wasn't the case then there'd be no need for the backup.
Post Reply