So, I’m trying to get a shell command working so that I can create a backup on my HA directory to a USB stick for safe keeping.
Here is what I have so far:
In .homeassistant/scripts/backup.yaml
backup:
alias: Backup HA Configuration Files
sequence:
- service: shell_command.backup_config
In .homeassistant/scripts/backup_config.sh
shell_command:
backup_config: rsync -av /home/homeassistant/.homeassistant/* /mnt/usb/backup-$(date +"%Y%m%d%H%M")/ --exclude deps --exclude home-assistant_v2.db
and in .homeassistant/automation/backup.yaml
alias: Backup HA Configuration Files
trigger:
platform: time
hours: 1
minutes: 1
seconds: 0
action:
- service: shell_command.backup_config
The error message i receive on the dev-info page is:
2017-06-30 22:34:47 WARNING (MainThread) [homeassistant.core] Unable to find service shell_command/backup_config
The script is visible in the HA front end and looks like it does call the shell command or at least the backup.yaml file in the scripts directory when I click the ACTIVATE
button.
Do I need to move the backup_config.sh to a different location?
Thanks in advance, I’m still kinda new to all this.
Bryan