Unable to run shell_command - works from shell

I have a basic shell command

delete_old_snapshots: find /backup/* -mtime +30 -exec rm {} \;

Which works fine when calling from the shell, however doesn’t work from hassio. and yields the following when setting debug level on logs.

2019-08-11 21:44:03 DEBUG (MainThread) [homeassistant.components.shell_command] Stderr of command: `find /backup/* -mtime +30 -exec rm {} \;`, return code: 1:
2019-08-11 21:44:03 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: `find /backup/* -mtime +30 -exec rm {} \;`, return code: 1

Any ideas?

When you SSH on, you’re in one container. Home Assistant runs in another container - one with different software, and potentially different volumes connected.

Minor plug for something I wrote. Delete old backups shell command error I had the same issue so I wrote a service that you can trigger in an automation. I have made a custom HACS project that you can use if you would like or just copy the files into the custom_components directory.

I have no special volumes but it could be. Ill see what I can dig up.