Rsyng doesn't run from cron, but manually
<p>I have a simple script for backing up files from my server. It does the following:</p>

<ul>
<li>Joins the server with SSH</li>
<li>Creates a MySQL dump file</li>
<li>Tar some folders</li>
<li>Exits</li>
<li>Starts rsnapshot to download the folder where the tar.gz and sql file are located</li>
<li>sshs back to the server just to clean up files</li>
<li>Exits</li>
</ul>

<p>On the top of my crontab I've given the following</p>

<pre><code>PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
SHELL=/bin/bash
</code></pre>

<p>However, the scripts sometimes starts, sometimes not. Also Rsnapshot sais for a few of my servers when running from cron:</p>

<pre><code>/usr/bin/rsnapshot -c /backup/configs/myserver.com.conf daily: ERROR: /usr/bin/rsync returned 255 while processing user@myserver.com:/home/user/serverdump/
</code></pre>

<p>Do you have any idea for both the issues?</p>