<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>it’s unix, not eunuchs &#187; Automation</title>
	<atom:link href="http://www.itsunixnoteunuchs.com/tag/automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.itsunixnoteunuchs.com</link>
	<description>Howdy!  I&#039;m Daniel J. Doughty, and these are my geeky thoughts.</description>
	<lastBuildDate>Sun, 30 Oct 2011 04:03:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Automating backups to mediamax</title>
		<link>http://www.itsunixnoteunuchs.com/2007/02/14/automating-backups-to-mediamax/</link>
		<comments>http://www.itsunixnoteunuchs.com/2007/02/14/automating-backups-to-mediamax/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 20:08:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AutoHotKey]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[Mediamax]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://www.danieljdoughty.com/2007/02/14/automating-backups-to-mediamax/</guid>
		<description><![CDATA[I was duly impressed with the 25GB of free storage mentioned in this lifehacker post, http://lifehacker.com/software/online-storage/get-25gb-of-free-online-storage-at-streamload-mediamax-234272.php, and so I set out to find a way for it to be useful. It&#8217;s worth mentioning that even though you can upload 25GB you can only download 1GB without paying a $5/month fee. But I&#8217;ll only need that [...]]]></description>
			<content:encoded><![CDATA[<p>I was duly impressed with the 25GB of free storage mentioned in this lifehacker post, <a href="http://lifehacker.com/software/feature/hack-attack-using-windows-scheduled-tasks-153089.php" class="snap_shots">http://lifehacker.com/software/online-st<wbr></wbr>orage/get-25gb-of-free-online-storage-at-s<wbr></wbr>treamload-mediamax-234272.php</a>, and so I set out to find a way for it to be useful. It&#8217;s worth mentioning that even though you can upload 25GB you can only download 1GB without paying a $5/month fee. But I&#8217;ll only need that when I need these backups or I may be able to keep backups of just the REALLY important stuff.</p>
<p>So the first thing to figure out is what&#8217;s the really important stuff. I googled around a bit to see what others thought was worthy of backing up. It seems like this is the sort of stuff people worry about the most:</p>
<ol>
<li>original content I created</li>
<li> pictures</li>
<li> financial documents</li>
<li> system configuration files</li>
<li> saved games</li>
<li> system drivers(or I would if I could figure out a way to do it from the command line)</li>
<li> registry AKA System State</li>
<li> system keys/licenses</li>
<li> bookmarks from browsers</li>
<li> scripts</li>
</ol>
<p>Things I&#8217;m NOT backing up:</p>
<ul>
<li> my .pst file.  I only use Outlook at work and I have a different backup solution there.</li>
<li> my calendar or address book. Those are again generally work related and the data is backed up via syncing to my Palm and another backup solution.</li>
</ul>
<p>Then it&#8217;s time to set up a mediamax account at <a href="http://lifehacker.com/software/feature/hack-attack-using-windows-scheduled-tasks-153089.php" class="snap_shots">http://www.mediamax.com</a>. Answer their confirmation email. And also use a command line interface to log into the FTP interface and create your backup directory. Basically that comes down to the following:</p>
<p>Start-&gt;Run-&gt;cmd-&gt;ftp ftp.mediamax.com -&gt; username-&gt;password-&gt;mkdir backup-&gt;quit</p>
<p>Then it&#8217;s time to set up your backup scripts.  I based mine off of the efforts of Adam Pash and BostonMark ala <a href="http://lifehacker.com/software/feature/hack-attack-using-windows-scheduled-tasks-153089.php" class="snap_shots">http://lifehacker.com/software/version-c<wbr></wbr>ontrol/hack-attack-simple-version-contro<wbr></wbr>l-170164.php</a>.  You can find my versions at <a href="http://danieljdoughty.com/version-control-with-ftp-backup.0.2.bat" title="Version Control Script" class="broken_link"><span class="snap_shots">http://danieljdoughty.com/version-control-wit<wbr></wbr>h-ftp-backup.0.2.bat</span></a> and <a href="http://danieljdoughty.com/ftp-backup.ftp" title="ftp-backup.ftp" class="broken_link"><span class="snap_shots">http://danieljdoughty.com/ftp-backup.ftp</span></a>. You may have to right click and select save as. I set up these files in the c:\scripts folder. If you want to put them there, you&#8217;ll probably have to create the directory. If you choose another location, you will have to adjust the batch script to compensate for the new location of the scripts directory.</p>
<p>You&#8217;ll need to modify these files. Modify the version control script with textpad and alter the section that is to be downloaded, AKA %HOMEPATH%\My Documents\Simple Version Control. And you&#8217;ll need to set your own username and password in the ftp-backup.ftp configuration file.</p>
<p>If you want to backup your IE bookmarks I advise you to use autohotkey, <a href="http://lifehacker.com/software/software/download-of-the-day-autohotkey-118270.php" class="snap_shots">http://lifehacker.com/software/software/d<wbr></wbr>ownload-of-the-day-autohotkey-118270.php</a>.  Then you want to download my autohotkey used to get IE bookmarks, <a href="http://danieljdoughty.com/getIEBookmarks.ahk" title="Autohotkey Script" class="broken_link"><span class="snap_shots">http://danieljdoughty.com/getIEBookmarks.ahk</span></a></p>
<p>CAVEAT: I&#8217;m an avid Firefox user and IETab user. Don&#8217;t bash on me backing up IE stuff. I work with developers who are instructed to code only to IE. It&#8217;s easier to use IE for these internal web pages than to argue with every developer in the department about how Firefox is different. I&#8217;m usually having a hard enough time convincing them that there&#8217;s a problem with the app.</p>
<p>Now run a test run. It&#8217;s best to do that from a command window as you will be able to scroll back and see if there is a problem somewhere in the processing. If it looks good, then log into mediamax. Under the File Manager section you will see a folder titled Uploaded File. Expand it out and you will see your backup files.</p>
<p>Finally schedule that backup in your windows scheduled tasks ala <a href="http://lifehacker.com/software/feature/hack-attack-using-windows-scheduled-tasks-153089.php" class="snap_shots">http://lifehacker.com/software/feature/h<wbr></wbr>ack-attack-using-windows-scheduled-tasks-1<wbr></wbr>53089.php</a> and you&#8217;ve got a backup set up for some of your most important stuff.</p>
<p>CAVEAT: I&#8217;ve heard awful reviews of mediamax&#8217;s customer service. So you may want to choose another webhost for this sort of thing. Since I&#8217;m not paying for their service, nor do I intend to use more than 1GB ever, I don&#8217;t think I&#8217;ll worry about it too much.</p>
<p>THINGS LEFT TO DO: I should add some code to delete the original backup folders and not delete the zipped file and also to add some limits. For instance, only keep local copies of the backups for so long. Also to delete remote copies after some time. Maybe tomorrow.</p>
<p>Also need this thing to clean up after itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsunixnoteunuchs.com/2007/02/14/automating-backups-to-mediamax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Livejournal autoposting</title>
		<link>http://www.itsunixnoteunuchs.com/2005/06/19/livejournal-autoposting/</link>
		<comments>http://www.itsunixnoteunuchs.com/2005/06/19/livejournal-autoposting/#comments</comments>
		<pubDate>Mon, 20 Jun 2005 00:24:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[livejournal]]></category>
		<category><![CDATA[lj]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.danieljdoughty.com/2005/06/19/livejournal-autoposting/</guid>
		<description><![CDATA[People always seem semi-surprised that I autopost in some journals and communities. I do it because I&#8217;m forgetful and compulsive. Anyhow, should you feel the same need, here&#8217;s how I&#8217;m doing it. Also, note, portions of this code were wrote by Emmie P. Lewis. Don&#8217;t who she/he is, but thanks for sharing, so now I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>People always seem semi-surprised that I autopost in some journals and communities. I do it because I&#8217;m forgetful and compulsive. Anyhow, should you feel the same need, here&#8217;s how I&#8217;m doing it.<br />
<a name="cutid1"></a><br />
Also, note, portions of this code were wrote by Emmie P. Lewis. Don&#8217;t who she/he is, but thanks for sharing, so now I&#8217;m doing the same.</p>
<p>[root@localhost root]# cat /dancron/ljPost.pl<br />
#!/usr/bin/perl</p>
<p>#===============================<br />
# How to send email with Net::SMTP<br />
# Copyright 2000, Emmie P. Lewis<br />
# Created 02/20/00<br />
#===============================<br />
# This script is designed to show<br />
# how to use Net::SMTP to send<br />
# email from a Perl script.<br />
#===============================<br />
# Modified by Daniel J. Doughty &lt;daniel.j.##**!!@gmail.com&gt;<br />
# Now it sends a post to livejournal.com via Emmie&#8217;s code.<br />
# Modified early 2005<br />
#==================================</p>
<p>use Net::SMTP;<br />
use Getopt::Std;</p>
<p># WARNING. This is a hardcoded value. You can tell I meant to catch it via a flag, but haven&#8217;t implemented it. Feel free to fix or hardcode your own community here.<br />
$opt_c = &#8220;some_community_name&#8221;;</p>
<p>getopts(&#8216;s:b:i:c:&#8217;);</p>
<p>#debugging stuff<br />
#print $opt_s;<br />
#print $opt_b;<br />
#print $opt_i;</p>
<p>chomp $opt_c;<br />
#print $opt_c;</p>
<p>#print &#8220;Content-type: text/plain&#8221;, &#8220;\n\n&#8221;;</p>
<p># This debug flag will print debugging code to your browser,<br />
# depending on its value<br />
# Set this to 1 to send debug code to your browser.<br />
# Set it to 0 to turn it off.</p>
<p>my $DEBUG = 0;</p>
<p>if($DEBUG)<br />
{<br />
$| = 1;<br />
open(STDERR, &#8220;&gt;&amp;STDOUT&#8221;);<br />
}</p>
<p># Another hard-coded value.<br />
# Set this variable to your smtp server name<br />
my $ServerName = &#8220;smtp-server.kc.rr.com&#8221;;</p>
<p># Create a new SMTP object<br />
# This is the debug option<br />
#$smtp = Net::SMTP-&gt;new($ServerName, Debug =&gt; 1);<br />
$smtp = Net::SMTP-&gt;new($ServerName, Debug =&gt; 0);</p>
<p># If you can&#8217;t connect, don&#8217;t proceed with the rest of the script<br />
die &#8220;Couldn&#8217;t connect to server&#8221; unless $smtp;</p>
<p># Initiate the mail transaction<br />
# Your &#8220;real&#8221; email address<br />
# Another hard-coded value<br />
my $MailFrom = &#8220;yourname\@yoursmtphost.com&#8221;;</p>
<p># Recipient&#8217;s &#8220;real&#8221; email address, yup, you guessed it. Hard-coded. AND PAY REAL CLOSE ATTENTION HERE. REPLACE THE 1234 WITH YOUR OWN PIN THAT YOU SET UP AT LIVEJOURNAL.COM<br />
my $MailTo = &#8220;someljname.$opt_c+1234\@post.livejournal.com&#8221;;</p>
<p style="margin-left: 30px">$smtp-&gt;mail( $MailFrom );<br />
$smtp-&gt;to( $MailTo );</p>
<p># Start the mail<br />
$smtp-&gt;data();</p>
<p># Send the header<br />
# This address will appear in the message<br />
# Same as the note above.  I don&#8217;t know why this is repeated.  She did it, not me.<br />
$smtp-&gt;datasend(&#8220;To: someusername.$opt_c+1234\@post.livejournal.com\n&#8221;);</p>
<p># So will this one<br />
$smtp-&gt;datasend(&#8220;From: someemailname\@somehost.com\n&#8221;);<br />
$smtp-&gt;datasend(&#8220;Subject: $opt_s\n&#8221;);<br />
$smtp-&gt;datasend(&#8220;\n&#8221;);<br />
$smtp-&gt;datasend(&#8220;lj-userpic: $opt_i\n&#8221;);<br />
$smtp-&gt;datasend(&#8220;\n&#8221;);</p>
<p># Send the body.<br />
$smtp-&gt;datasend(&#8220;$opt_b\n\n&#8221;);</p>
<p># Send the termination string<br />
$smtp-&gt;dataend() ;</p>
<p># Close the connection<br />
$smtp-&gt;quit();</p>
<p>Here&#8217;s the crontab entry I use to call it. It accepts 3 flags, -s for subject, -b for the body and -i for the image to post with. This image tag must already be uploaded and named correctly. If you post the wrong image name, it will just use your default image, if you have one.</p>
<p>29 17 */7 4-9 * /dancron/ljPost.pl -s &#8220;SUBJECT&#8221; -b &#8220;Body of text&#8221; -i &#8220;can&#8217;t remember what this flag is for&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.itsunixnoteunuchs.com/2005/06/19/livejournal-autoposting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

