VMware Cloud Community
budyonuj
Contributor
Contributor
Jump to solution

GhettoVCB Restoring problem

Hi all!

Don't know where i can public my problem.

I have the next problem.

I'm using VMWARE ESXI 5.5.0 1746974, and running GhettoVCB fine. Script is making compressed backups.

When i try to make test restore, i found some problems.

As i understood there is no possibility to restore directly from .gz. So to restore, first i extracted .gz archive with command "tar -zxvf". Finally, after extraction i had just 2 files. test-flat.vmdk and test.vmx, but not have test.vmdk, so cannot use ghettovcb-restore.sh, and cannot manually add it to inventory.

Strange, but when i copy it to windows machine, and extract it with 7-zip two times(first time after extraction i have 1 file with the same name as archive and no extention, second time i have 3 files, and have test.vmdk - fille, and have fully working machine).

I know that i can copy test.vmdk from working VM, and just put it in extract folder, and i'll have working VM, but it's not good solution, as my backups will not be fully functional without it.

Maybe there is some other linux command instead of tar -zxvf, or maybe there is some other tricks which i dont know.

Please help me to finish my backup solution.

Labels (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
MKguy
Virtuoso
Virtuoso
Jump to solution

-rw------- root/root 54975581388800 2014-07-02 23:15:09 1CSRV-2014-07-02_23-15-01/1CSRV-flat.vmdk

Something seems wrong here. Look at the file size reported by the 1CSRV-flat.vmdk file: 54975581388800 Bytes are 51200 GiB. I guess 7zip shows 50 GiB in the archive index and the original vmdk was 50GiB as well?

Then it's possible that it's a bug on the ESXi busybox tar binary. Maybe you can test with smaller and other tarballs as large as that one, I can at least untar small files without problems on my hosts.

-- http://alpacapowered.wordpress.com

View solution in original post

Reply
0 Kudos
6 Replies
MKguy
Virtuoso
Virtuoso
Jump to solution

You can use the gunzip command from the ESXi shell to unzip the outer compressed gzip archive and then use tar -xvf on the extracted file.

-- http://alpacapowered.wordpress.com
Reply
0 Kudos
budyonuj
Contributor
Contributor
Jump to solution

Hi, MKguy!

Thanks for your respond!

Just made like you wrote.

After gunzip, i had 1 file with the same name as archive, but without extention.

Next try tar -xvf. An error appeared:

tar -xvf

1CSRV-2014-07-02_23-15-01

1CSRV-2014-07-02_23-15-01/

1CSRV-2014-07-02_23-15-01/1CSRV.vmx

tar: can't create directory '1CSRV-2014-07-02_23-15-01': File exists

tar: can't remove old file 1CSRV-2014-07-02_23-15-01/1CSRV.vmx: Function not implemented

Ok, rename 1CSRV-2014-07-02_23-15-01 to 1CSRV, and tried again:

tar -xvf 1CSRV

1CSRV-2014-07-02_23-15-01/

1CSRV-2014-07-02_23-15-01/1CSRV.vmx

1CSRV-2014-07-02_23-15-01/1CSRV-flat.vmdk

tar: short read

And have the same files again, just 1CSRV.vmx and 1CSRV-flat.vmdk.

Any other ideas??

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

I'm not sure but the tarball might be corrupt (most likely at the large vmdk flat file). Post the output of tar -tvf  which should list all files contained in the tarball. Compare the reported size of the vmdk flat file with what's extracted and what the actual size of the original vmdk flat file is.

Also use the 7zip test archive function on the tar file to see whether there are any errors.

Btw you are doing that extraction on a VMFS datastore, right?

-- http://alpacapowered.wordpress.com
Reply
0 Kudos
budyonuj
Contributor
Contributor
Jump to solution

/vmfs/volumes/538486bb-80b94f8c-518f-40f2e92eba0a/backupstore/1CSRV # tar -tvf 1CSRV

drwxr-xr-x root/root         0 2014-07-02 23:18:17 1CSRV-2014-07-02_23-15-01/

-rwxr-xr-x root/root      3222 2014-07-02 23:15:06 1CSRV-2014-07-02_23-15-01/1CSRV.vmx

-rw------- root/root 54975581388800 2014-07-02 23:15:09 1CSRV-2014-07-02_23-15-01/1CSRV-flat.vmdk

tar: short read

7-zip test runs success.

Extraction goes on datastore.

Maybe it's some ESXI problem??my archives are more than 6-8 GB size.

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

-rw------- root/root 54975581388800 2014-07-02 23:15:09 1CSRV-2014-07-02_23-15-01/1CSRV-flat.vmdk

Something seems wrong here. Look at the file size reported by the 1CSRV-flat.vmdk file: 54975581388800 Bytes are 51200 GiB. I guess 7zip shows 50 GiB in the archive index and the original vmdk was 50GiB as well?

Then it's possible that it's a bug on the ESXi busybox tar binary. Maybe you can test with smaller and other tarballs as large as that one, I can at least untar small files without problems on my hosts.

-- http://alpacapowered.wordpress.com
Reply
0 Kudos
budyonuj
Contributor
Contributor
Jump to solution

Looks like it's VMware bug, or limitation. Just made new VM, with 10GB HDD, and bade it's backup. Than extract it, and saw 3 files, i need.

Thanks for your help. Now i know that i can do nothing with it 🙂

Reply
0 Kudos