I commented out this line in .bashrc:
# [ -z "$PS1" ] && return
and now the alias gets read, but I still cannot execute it... :/
We can ask the server if the alias has been defined:
$ ssh server "cd /tmp && alias backup_tb"
alias backup_tb='pg_dump -U david tb > tb.sql'
But it is not expanded:
$ ssh server "cd /tmp && backup_tb"
bash: backup_tb: command not found
Any ideas?