crontab + rsync problem

Andrew Glen-Young aglenyoung at gmail.com
Thu Oct 11 10:26:01 UTC 2007


On 11/10/2007, Luca Ferrari <fluca1978 at infinito.it> wrote:
>
> It seems it is not run, an even placing such commands for the ssh identity
> in .profile or .bashrc solve the problem. Now, placing the commands in my
> backup script worked, but I don't feel this an elegant solution. Any other
> way to achieve this?
>

See my previous post for why bash is not sourcing your '.bash_profile'.

If you really don't like the commands in your backup script you could
source the '.bash_profile' in your script or define the BASH_ENV
variable in the crontab.
Both these methods feel "brittle" to me as they are not very portable.

I personally use separate user accounts, unique ssh keys without
passphrases and authorized_keys files with 'from' and 'command'
patterns in them. This, however, might not suit you.

- A.




More information about the ubuntu-users mailing list