Hi folks, thanks in advance for your suggestions.
I have a backup routine that’s run from a different computer than my Home Assistant host. Currently it works fine, regularly rsync-ing off my Home Assistant Snapshots for safe keeping.
I’d like to extend it a little, by creating a Snapshot automatically too.
I can log into Home Assistant just fine using my .ssh/config below
Host homeassistant
User root
Port 2022
Hostname 192.168.x.x
I can then login just fine.
$ ssh homeassistant
| | | | /\ (_) | | | |
| |__| | ___ _ __ ___ ___ / \ ___ ___ _ ___| |_ __ _ _ __ | |_
| __ |/ _ \| '_ \ _ \ / _ \ / /\ \ / __/ __| / __| __/ _\ | '_ \| __|
| | | | (_) | | | | | | __/ / ____ \\__ \__ \ \__ \ || (_| | | | | |_
|_| |_|\___/|_| |_| |_|\___| /_/ \_\___/___/_|___/\__\__,_|_| |_|\__|
Welcome to the Home Assistant command line.
System information ...
I can also run commands remotely just fine
$ ssh homeassistant ha
The Home Assistant CLI is a small and simple command line utility that allows
you to control and configure different aspects of Home Assistant
Usage:
ha [command]
Available Commands:
addons Install, update, remove and configure Home Assistant add-ons
etc etc etc
However, it gets stuck when it gets to snapshots …
$ ssh homeassistant ha snapshots
Unexpected server response. Status code: 401
time="2021-04-09T22:12:41+01:00" level=error msg="Unexpected server response. Status code: 401"
and
$ ssh homeassistant ha snapshots new
Unexpected server response. Status code: 401
time="2021-04-09T22:13:32+01:00" level=error msg="Unexpected server response. Status code: 401"
Does anyone know a nice way of convincing Home Assistant to allow me to create the Snapshot remotely using SSH?
Many thanks as always!