Skip to content

Instantly share code, notes, and snippets.

@savager
Last active January 24, 2020 18:50
Show Gist options
  • Select an option

  • Save savager/b060152e6a05f9719e407d964e43aecb to your computer and use it in GitHub Desktop.

Select an option

Save savager/b060152e6a05f9719e407d964e43aecb to your computer and use it in GitHub Desktop.
# mac bit for bit copy of usb drive from one to another with progress
#find disk numbers
diskutil list
# unmount both disks first
diskutil unmountDisk /dev/disk4
diskutil unmountDisk /dev/disk7
# then copy
sudo dd if=/dev/rdisk4 of=/dev/rdisk7 bs=1m & pid=$!
# download a backup of the esxi host's configuration. SSH into host and run this.
vim-cmd hostsvc/firmware/backup_config
# restore from backup:
# put in maintenance mode:
vim-cmd hostsvc/maintenance_mode_enter
# then scp the file to the temp dir
scp /Wherever/esxi\ config\ backup/configBundle-stripe.ohgoshno.tgz root@stripe.ohgoshno:/tmp
# then restore
vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment