Skip to content

Instantly share code, notes, and snippets.

@grantstephens
Created February 9, 2023 06:00
Show Gist options
  • Save grantstephens/a91713a6bb5d81011178a4f9113dcf1f to your computer and use it in GitHub Desktop.
Save grantstephens/a91713a6bb5d81011178a4f9113dcf1f to your computer and use it in GitHub Desktop.
How to restore home assistant on k8s
  1. Deploy new home asssiant
  2. Edit deployment and add custom command: `command: ["sleep", "infinity"]
  3. Exec onto sleeping pod and delete everything in config dir. eg: k exec -n homeassistant home-assistant-xxx -it /bin/sh`
  4. Use kubectl cp to copy unzipped backup into place: k cp -n homeassistant . home-assistant-xxx:/config You may have to hurry as the pod will be restarted as it will be failing its liveliness tests.
  5. Edit the deployment again to remove the sleep command
  6. Breathe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment