VMware Cloud Community
jay70
Contributor
Contributor

ESXI 6 - backup without 3rd party apps

Hello all,

This is my setup:

ESXi 6 running one VM (win server 2008)

NFS server running on a Linux PC (for backup) and NFS share mounted on ESXi server.

The objective:

Friday evening - Make one full backup (weekly)

Monday to Thursday evenings - create daily snapshot (incremental backups)

Status:

The full backup is pretty straightforward.

I created a script on ESXi sever to suspend the VM and copy files to NFS share then start the VM again.

So if anything goes horribly wrong I can use the backed up VM files.

As far as snapshots I am having difficulty figuring out how best to manage these.

Note: It is unrealistic to do a full backup every evening due to storage, network, and time constraints.

Snapshot Problem:

Scenaro 1:  Snapshots stored on NFS location.

If snapshots are saved to NFS location and the running VM becomes corrupt can these snapshots be associated with my VM backup files?

If I change the .vmx config to use NFS as working directory will then VM is running off snapshots that reside in network location causing performance issues (?)

Also some other files will use this new location (eg. swap file and .vmem) which seems a bad idea performance-wise since they are on the network instead of being accessed locally.

Scenario 2: Leave snapshots in working directory and copy nightly to backup on NFS

Leaving the snapshot files in the same working directory requires that I successfully copy all snapshot related files to the network daily.

If I manage to backup all the necessary files correctly I am still faced with the problem of whether these could be applied to the VM backup files rather than the running VM.

-----------------------------------------------

So, not sure how to manage this. Any suggestions or feedback would be greatly appreciated.

Hope this makes sense.

Regards.

0 Kudos
3 Replies
LoLoh
Contributor
Contributor

Hello,

I'm new and have similar questions; I have been reading a bunch today, and it is my understanding that a "snapshot" isn't intended to be a full backup.  It is more so for restoring software corruption.  IE, you take a snapshot, then go and install an exchange service pack, or windows updates; if things go wrong, then you can revert to the snapshot.
By default the snap shot is automatically stored on the same Data Store as the Virtual Machine. (this is usually preferred, because it is the quickest)  The most common complaint is if the data store is low on space.   If that is the scenario, then the snapshot location needs to be moved to other local or network based storage: Creating snapshots in a different location than default virtual machine directory for VMware ESXi an...

In regards to a full backup, copying the entire VM's folder contents to another Data Store located on another drive / disk set, should do the trick. The VM has to be powered off and not suspended:  Best practices when backing up a VMware Workstation virtual machine (2006202) | VMware KB

I have a Raid5 set with hot spare as my main storage Data store;  In the event of 2 disks failing at the same time, it's my understanding that I can replace the disks, rebuild the Raid5 set and re-create the "main_Storage"  data store;   after that it's copying the folder / contents of the VM back to the main data store;   *NOTE*  this is also assuming that you do NOT have ESXI / host installed on the raid 5 set.   I install Esxi to a 4GB USB memory stick;  after all VM's are created; I make at least 2 clones of the USB stick.  (one get's taped to the case in the server room and the other goes offsite;  anytime that changes to a VM are made (both spare USB sticks need to be re-cloned) .

http://prntscr.com/cxa7up

In this screen shot I have a 2012 server with 1 TB of allocated space,  The backup drive is only 3.6, which means I can only have 3 backups of this VM off of the Main_Storage at any given time. 

0 Kudos
jay70
Contributor
Contributor

Thanks for your response.

As I mentioned, the full backup is not an issue since I can simply copy folder with all associated files to a secure location.

I also understand that snapshots are not intended to be used as backups though in this case a full nightly backup is just not practical considering disk space.

If snapshots are created and stored in a network location and the running VM becomes corrupted or stops functioning the snapshots themselves are no help.

So, I need to be able to associated these snapshots with a backup of the VM in order to make restoration possible in case of a major issue.

0 Kudos
LoLoh
Contributor
Contributor

I think it depends on the extent of how damaged / corrupt the VM becomes;  If the VM still shows up as a virtual machine in your vmware vsphere client; (but for example, is corrupt and won't boot) I would think that you still would have access to the network location and could restore a snapshop with the VM powered off. In theory, when the snapshot is restored, you are good to go again.   Esxi has the knowledge of the data stores and the VM's created; The default snapshot location is the same datastore as the VM, so let's say that a drive becomes corrupted in the datastore & it breaks your VM.  If your snapshot is on a different datastore, I would think that you should be able to restore the snapshot.   However if the snapshot is on the same datastore as the VM (with the corrupt drive) then it's probable that the VM and all snapshots are not usable.  At that point you would need to replace the corrupted drive, rebuild the data store and then manually copy the files from your full backup to the freshly rebuilt datastore. 
If I understand correctly, from this point, you would like to be able to restore one of the snapshots, which probably isn't possible, because the restored full backup, has no knowledge of the snapshots...

Monday -  Full backup to remote location

Tuesday - snapshot to remote location

Wed - snapshot to remote location

Thurs - snapshot to remote location

Friday - Failure & restoration of files from Monday.  Monday's manual backup has no knowledge of Tuesday, wed, or thurs, snapshots.   I'm assuming that you are asking how to restore Monday's full backup and then grab the snapshot from Thursday?

Has anyone tried:

Esxi on a memory Stick wiht VM1 created.

Physical Disk 1 = Datastore 1  where VM1 resides
Physical Disk 2 = Datastore 2  where a snapshot of VM1 resides.

Unplug Physical Disk 1 so that Datastore 1 is gone;  Plug in Physical Disk 3 and re-create a blank Datastore 1.

Restore VM1 snapshot on Datastore 2, to the newly re-created DataStore 1 that resides on physical disk 3

If no one has tried this, I might give it a go to see what happens...

0 Kudos