<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Trouble free backups, Part Three - Scheduling&#160;backups</title>
	<atom:link href="http://www.magpiebrain.com/blog/2005/10/31/trouble-free-backups-part-three-scheduling-backups/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.magpiebrain.com/blog/2005/10/31/trouble-free-backups-part-three-scheduling-backups/</link>
	<description>Sam Newman's blog</description>
	<pubDate>Sun, 12 Oct 2008 07:31:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Fisslefink</title>
		<link>http://www.magpiebrain.com/blog/2005/10/31/trouble-free-backups-part-three-scheduling-backups/#comment-60765</link>
		<dc:creator>Fisslefink</dc:creator>
		<pubDate>Thu, 27 Sep 2007 21:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/2005/10/31/trouble-free-backups-part-three-scheduling-backups/#comment-60765</guid>
		<description>Thanks, this almost solved my problem... and then a major stumbling block for me was getting cron jobs to authorize SSH keys with the ssh-agent started by SSHKeychain.

I was getting lots of 'mail' from cron that said "Permission denied, please try again."  Clearly the ssh job being run from cron was not authorizing my SSH keys through SSHKeychain!

This forum post clued me in to the answer: http://forum.strongspace.com/viewtopic.php?pid=700

What went wrong?  The 'global environment variable' set by SSHKeychain does not propogate all the way down to cron, which is run with a separate 'environment'.  So you have to tell it where to find the SSH authorization socket.  Here is how:

1) First, make sure you set SSHKeychain to "Manage and modify global environment variables" in the Preferences -&#62; Environment tab
2) Take note of the "SSH_AUTH_SOCK" variable name ... the default is /tmp/501/SSHKeychain.socket
3) Set that variable in your crontab by putting it at the very top of the file.  Use crontab -e to do this from the terminal (you might want to google "vim" to learn how to edit a crontab!).  My crontab looks like this:

SSH_AUTH_SOCK=/tmp/501/SSHKeychain.socket
0 15 * * 1-5 /usr/bin/backup

(my backup job runs at 3pm, monday through friday)

NOTE:  I don't know if this also works for anacron, or if anacron avoids the problem of environment forking entirely (since it is not mentioned in the tutorial)</description>
		<content:encoded><![CDATA[<p>Thanks, this almost solved my problem&#8230; and then a major stumbling block for me was getting cron jobs to authorize <acronym title="Secure SHell (encrypted protocol replaces telnet and FTP)">SSH</acronym> keys with the <acronym title="Secure SHell (encrypted protocol replaces telnet and FTP)">SSH</acronym>-agent started by SSHKeychain.</p>
<p>I was getting lots of &#8216;mail&#8217; from cron that said &#8220;Permission denied, please try again.&#8221;  Clearly the <acronym title="Secure SHell (encrypted protocol replaces telnet and FTP)">SSH</acronym> job being run from cron was not authorizing my <acronym title="Secure SHell (encrypted protocol replaces telnet and FTP)">SSH</acronym> keys through SSHKeychain!</p>
<p>This forum post clued me in to the answer: <a href="http://forum.strongspace.com/viewtopic.php?pid=700"  rel="nofollow">http://forum.strongspace.com/viewtopic.php?pid=700</a></p>
<p>What went wrong?  The &#8216;global environment variable&#8217; set by SSHKeychain does not propogate all the way down to cron, which is run with a separate &#8216;environment&#8217;.  So you have to tell it where to find the <acronym title="Secure SHell (encrypted protocol replaces telnet and FTP)">SSH</acronym> authorization socket.  Here is how:</p>
<p>1) First, make sure you set SSHKeychain to &#8220;Manage and modify global environment variables&#8221; in the Preferences -> Environment tab<br />
2) Take note of the &#8220;SSH_AUTH_SOCK&#8221; variable name &#8230; the default is /tmp/501/SSHKeychain.socket<br />
3) Set that variable in your crontab by putting it at the very top of the file.  Use crontab -e to do this from the terminal (you might want to google &#8220;vim&#8221; to learn how to edit a crontab!).  My crontab looks like this:</p>
<p>SSH_AUTH_SOCK=/tmp/501/SSHKeychain.socket<br />
0 15 * * 1-5 /usr/bin/backup</p>
<p>(my backup job runs at 3pm, monday through friday)</p>
<p>NOTE:  I don&#8217;t know if this also works for anacron, or if anacron avoids the problem of environment forking entirely (since it is not mentioned in the tutorial)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerhard</title>
		<link>http://www.magpiebrain.com/blog/2005/10/31/trouble-free-backups-part-three-scheduling-backups/#comment-2753</link>
		<dc:creator>Gerhard</dc:creator>
		<pubDate>Tue, 22 Aug 2006 08:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.magpiebrain.com/2005/10/31/trouble-free-backups-part-three-scheduling-backups/#comment-2753</guid>
		<description>Hi mate, congrats on the great tutorials!

I keep getting this error with anacron:

Aug 22 11:04:01 apalia anacron[3031]: Anacron 2.3 started on 2006-08-22
Aug 22 11:04:01 apalia anacron[3031]: Can't open timestamp file for job cron.daily: Permission denied

Any ideas on how to correct the error?</description>
		<content:encoded><![CDATA[<p>Hi mate, congrats on the great tutorials!</p>
<p>I keep getting this error with anacron:</p>
<p>Aug 22 11:04:01 apalia anacron<sup><a href="#fn3031">3031</a></sup>: Anacron 2.3 started on 2006-08-22<br />
Aug 22 11:04:01 apalia anacron<sup><a href="#fn3031">3031</a></sup>: Can&#8217;t open timestamp file for job cron.daily: Permission denied</p>
<p>Any ideas on how to correct the error?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
