Jump to content

Recommended Posts

Posted (edited)

Backing up VMs on a few ESXi boxes to a NFS share I have worked out and even automated using plink and a scheduled task however on reading up on how to restore a VM just adds layers of confusion so I'm wondering if I'm barking up the wrong tree here but do I need a list file with the names in and if I do what format do I need them in ( TXT ? ) - the guide is next to useless and not very clear.

 

I have a backed up VM on a NFS share in a file called:

 

[backup_Data_Store] New Virtual Machine/New Virtual Machine-2016-01-20_15-19-23

 

I want to restore this on a different data store I have created called:

 

[DATA_STORE_02]

 

The switch options are -c which is the backup list, -l for logging and -d for the dry run.

How do I specify what data store I want it recovered to ?

There is file called - ghettoVCB-restore_vm_restore_configuration_template - is this the backup list file that needs configuring ? Any advice on this would be appreciated - I would like to simply enter a command in putty which had the entire string ( similar to backing them up ) or is this not possible when restoring ?

Edited by mattx
Posted

It's about 3 years since I looked at Ghetto but I don't remember it being difficult to restore a machine.

 

I will have to have a look at what it does to refresh my memory..

 

TT

Posted
It's about 3 years since I looked at Ghetto but I don't remember it being difficult to restore a machine.

 

I will have to have a look at what it does to refresh my memory..

 

TT

 

Thanks - would appreciate any pointers on this.

Posted

-c specifies the file to load with the VM's to restore.

 

that file contains source and destination.

 

 

 

 

 

https://communities.vmware.com/docs/DOC-10595

 

 

Standard input for script is a file that contains:

1) Full path to the backed up VM

2) Full restore path

3) Restoration disk format

4) Restored VM Display Name (NEW!)

 

Here is a sample of what the file should look like:

 

 

 

 

 

[root@himalaya ~]# cat vms_to_restore

#";;;"

# DISK_FORMATS

# 1 = zeroedthick

# 2 = 2gbsparse

# 3 = thin

# 4 = eagerzeroedthick

# e.g.

# "/vmfs/volumes/dlgCore-NFS-bigboi.VM-Backups/WILLIAM_BACKUPS/VCAP/VCAP-2009-08-18--1;/vmfs/volumes/himalaya-local-SATA.RE4-GP:Storage;1"

"/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36;/vmfs/volumes/mini-local-datastore-1;3"

"/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36;/vmfs/volumes/mini-local-datastore-1;1;VCSA-RESTORE"

Posted (edited)

I have those instructions printed off ;-)

I simply don't understand them. Will give it another crack tomorrow.

 

-c specifies the file to load with the VM's to restore.

 

that file contains source and destination.

 

 

 

 

 

https://communities.vmware.com/docs/DOC-10595

 

 

Standard input for script is a file that contains:

1) Full path to the backed up VM

2) Full restore path

3) Restoration disk format

4) Restored VM Display Name (NEW!)

 

Here is a sample of what the file should look like:

 

 

 

 

 

[root@himalaya ~]# cat vms_to_restore

#";;;"

# DISK_FORMATS

# 1 = zeroedthick

# 2 = 2gbsparse

# 3 = thin

# 4 = eagerzeroedthick

# e.g.

# "/vmfs/volumes/dlgCore-NFS-bigboi.VM-Backups/WILLIAM_BACKUPS/VCAP/VCAP-2009-08-18--1;/vmfs/volumes/himalaya-local-SATA.RE4-GP:Storage;1"

"/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36;/vmfs/volumes/mini-local-datastore-1;3"

"/vmfs/volumes/mini-local-datastore-2/backups/VCSA-5.1/VCSA-5.1-2012-12-25_01-30-36;/vmfs/volumes/mini-local-datastore-1;1;VCSA-RESTORE"

Edited by mattx
Posted (edited)

you have VM1 backed up to /vmfs/volumes/datastore2/VM1/VM1-2016-01-20_19-28-00 , you want to restore it to /vmfs/volumes/datastore3

 

create a file with anyname eg "VM-REST-TEST"

 

in the file specify where the backed up machine is, where you want it to go, 3 for a thin provisioned disk, and the display name of the restored machine.

 

so

"/vmfs/volumes/datastore2/VM1/VM1-2016-01-20_19-28-00;/vmfs/volumes/datasore3;3;VM1-RESTORE"

 

run

 

./ghettoVCB-restore.sh -c VM-REST-TEST

 

 

Should then restore the VM to the new location, you will then need to import it to the inventory.

 

TT

Edited by twin--turbo
  • Thanks 1
Posted
You can always copy the backup file to the new datastore and import it - I have used this to move VMs between hosts before now, no command line work needed. Will that do what you need?
  • Thanks 1
Posted
You can always copy the backup file to the new datastore and import it - I have used this to move VMs between hosts before now, no command line work needed. Will that do what you need?

 

I was thinking if that was possible - I'll try that in the morning - thanks.

 

- - - Updated - - -

 

you have VM1 backed up to /vmfs/volumes/datastore2/VM1/VM1-2016-01-20_19-28-00 , you want to restore it to /vmfs/volumes/datastore3

 

create a file with anyname eg "VM-REST-TEST"

 

in the file specify where the backed up machine is, where you want it to go, 3 for a thin provisioned disk, and the display name of the restored machine.

 

so

"/vmfs/volumes/datastore2/VM1/VM1-2016-01-20_19-28-00;/vmfs/volumes/datasore3;3;VM1-RESTORE"

 

run

 

./ghettoVCB-restore.sh -c VM-REST-TEST

 

 

Should then restore the VM to the new location, you will then need to import it to the inventory.

 

TT

 

I shall also try this - thanks for the advice - appreciate it. I'll update the thread when I'm done.

Posted

Yep - worked a treat - my file:

 

"/vmfs/volumes/Backup_Data_Store/New Virtual Machine/New Virtual Machine-2016-01-20_15-19-23;/vmfs/volumes/DATA_STORE_02;4;TEST-RESTORE"

 

Did not need to import it as it was already in the list of devices after the restore. The only thing it asked was how it got there when it was powered up - so I responded that I copied it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...