Are you trying this in the homeassistant container? Test it in hte home assistant docker.
# docker exec -it homeassistant bash
bash-5.1#
bash-5.1# cd ~/backup
bash: cd: /root/backup: No such file or directory
bash-5.1# cd /backup
bash: cd: /backup: No such file or directory
bash-5.1# cd /config
bash-5.1#
You can use “ssh & web terminal” addon (I dont think the “Terminal & SSH” add-on you have does this). You’ll need to disable the ‘protection mode’. That is on the addon page. Once you connect to to the terminal, you can then connect to the homeassistant docker and test your script.
docker exec -it homeassistant bash
I will tell you that the reason it is working for config and not backups is because config is exposed in the homeassistant docker while ‘backups’ is not. That is exposed in the supervisor docker which you can’t access directly with a shell_command.