2

This question already has an answer here:

What's the best way to backup a USB drive with bootable data on it? For instance, I have what's called an ESXi server on a bootable USB, it's basically a linux variant with multiple partiions. What's the best way to back it up in case the original USB drive fails and the server needs to be put back together in a hurry?

It seems my desires are:

  • 1 Keep the backup solution as simple as possible
  • 2 Keep system online for when system files are routinely backed up
  • 3 Make drive replacement easy

So with dd alone, criterion 1 and 3 are met possibly with...

sudo dd if=/dev/sdc | gzip > /storage/backups/esxi-usb-backup-2014-nov.gz

but someone on the internet criticized using dd due to geometry not being garanteed between drives. I didn't really understand what they meant because they were inarticulate, but I understand that a replacement drive of the same spec as the original may contain more bad sectors than the original and thus may not be able to fit all the partitions from the original on it. Is that what he meant? Would a workaround be to only allocate 80% of the thumb drive to leave slack for bad sectors? That's still an option at this point I believe.

If 1 and 3 are met with DD, then I can use ssh and rsync the file system to a backup location, then when the USB drive eventually dies, I can flash a new drive using the dd image, and then rsync the files over thereafter, accomplishing 2 and 3 (but not really achieving 1).

Does anyone know of a more practicle solution?

marked as duplicate by ewwhite, Michael Hampton Nov 14 '14 at 23:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Hi, thanks for your interest in this question. Please note that this question differs from the question of how to specifically back up ESXi. ESXi is a bootable OS I used as an example for the general question, which was "How to Backup Entire USB Drive Containing Bootable Partitions in Debian". A correct answer to this question SHOULD apply to people with ESXi installs AND ALSO other UNIX based OS installs, whereas the answer to the suggested duplicate does NOT apply to bootable USB partitions broadly, only ESXi partitions. Thanks again for your interest in this question! – Ninjaxor Nov 18 '14 at 18:23
  • Is it desirable to remove references to the example OS I used? I can replace it with an imaginary OS if that's easier for others to understand. – Ninjaxor Nov 19 '14 at 1:05
  • The question you put forth in your comment is quite different than the question you actually asked. If you had a different question, you should ask it instead. – Michael Hampton Nov 22 '14 at 22:02
  • Welcome to Server Fault! We're generally not into hypothetical questions here - it's about your specific professional problem, and everyone's solutions when in that situation. – Falcon Momot Nov 22 '14 at 22:02
  • Please don't radically alter your question after it's already been answered. This is unfair to the people who answered as well as to future readers. As you were previously advised, you should ask a new question. – Michael Hampton Nov 23 '14 at 20:51
1

Typically, one would backup the ESXi host's configuration and, in the event of a failure, reinstall ESXi to a new USB disk and restore the backup.

1

It's actually bad practice to use USB boot for VMware ESXi hosts when you don't have shared storage or a VMware cluster.

When you're in a VMware cluster situation, your virtual machines live on a shared NAS or SAN and you're more capable of dealing with a host failure. If you are just running one VMware server, then booting off of USB (or SDHC card) is an unnecessary risk.

Long term, the better solution is to install VMware on actual disks if you're using a single host server. Otherwise, you can take periodic backups of the configuration from the host's shell or command line with:

vim-cmd hostsvc/firmware/backup_config

This produces a web link that you'll be able to browse to and download a tarball of the host's configuration.

Also see: What happens when the USB key or SD card I've installed VMware ESXi on fails?

Not the answer you're looking for? Browse other questions tagged or ask your own question.