<?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>Matt Thiessen &#187; Server Admin</title>
	<atom:link href="http://matt.thiessen.us/category/server-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://matt.thiessen.us</link>
	<description>Learning to make the hard things easy</description>
	<lastBuildDate>Thu, 09 Feb 2012 03:45:21 +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>Using grep to scrape web pages</title>
		<link>http://matt.thiessen.us/2009/09/using-grep-to-scrape-web-pages/</link>
		<comments>http://matt.thiessen.us/2009/09/using-grep-to-scrape-web-pages/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:38:20 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[scrape]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=294</guid>
		<description><![CDATA[In preperation to scrape a number of web pages, I used grep to make a list of URLs I need to scrape.  The list of URLs was in an RSS file. grep -P &#8220;\&#60;link&#62;&#60;\![CDATA\[(.*?)]&#8221; hawkeye_stories.xml &#62; hawkeye_stories_links.txt]]></description>
			<content:encoded><![CDATA[<p>In preperation to scrape a number of web pages, I used grep to make a list of URLs I need to scrape.  The list of URLs was in an RSS file.</p>
<p>grep -P &#8220;\&lt;link&gt;&lt;\![CDATA\[(.*?)]&#8221; hawkeye_stories.xml &gt; hawkeye_stories_links.txt</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/2009/09/using-grep-to-scrape-web-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash script to backup a WordPress web site</title>
		<link>http://matt.thiessen.us/2009/08/bash-script-to-backup-a-wordpress-web-site/</link>
		<comments>http://matt.thiessen.us/2009/08/bash-script-to-backup-a-wordpress-web-site/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 15:31:27 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=292</guid>
		<description><![CDATA[The script (backup_site.sh) for backing up a site has been modified.  It now accepts parameters. Parameter 1: domain Parameter 2: database [optional] Parameter 3: subdomain [optional] Run as root /home/root/sites/backup_site.sh gazlab.com matt_wp matt #!/bin/bash SITE=$1 SUBDOMAIN=$3 DBNAME=$2 if [ -z "$SUBDOMAIN" ] then if [ -z "$DBNAME" ] then mysqldump $DBNAME &#62; /var/www/vhosts/$SITE/httpdocs/$DBNAME.sql fi tar [...]]]></description>
			<content:encoded><![CDATA[<p>The script (backup_site.sh) for backing up a site has been modified.  It now accepts parameters.</p>
<p>Parameter 1: <span style="color: #3366ff;">domain</span><br />
Parameter 2: <span style="color: #ff6600;">database</span> [optional]<br />
Parameter 3: <span style="color: #ff00ff;">subdomain</span> [optional]</p>
<p>Run as root</p>
<p>/home/root/sites/backup_site.sh <span style="color: #3366ff;">gazlab.com</span> <span style="color: #ff6600;">matt_wp</span> <span style="color: #ff00ff;">matt</span></p>
<p>#!/bin/bash</p>
<p>SITE=$1<br />
SUBDOMAIN=$3<br />
DBNAME=$2</p>
<p>if [ -z "$SUBDOMAIN" ]<br />
then<br />
if [ -z "$DBNAME" ]<br />
then<br />
mysqldump $DBNAME &gt; /var/www/vhosts/$SITE/httpdocs/$DBNAME.sql<br />
fi<br />
tar -czvf $SITE.httpdocs.tar.gz /var/www/vhosts/$SITE/httpdocs<br />
else<br />
if [ -z "$DBNAME" ]<br />
then<br />
mysqldump $DBNAME &gt; /var/www/vhosts/$SITE/subdomains/$SUBDOMAIN/httpdocs/$DBNAME.sql<br />
fi<br />
tar -czvf $SUBDOMAIN.$SITE.httpdocs.tar.gz /var/www/vhosts/$SITE/subdomains/$SUBDOMAIN/httpdocs<br />
fi</p>
<p>exit 0</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/2009/08/bash-script-to-backup-a-wordpress-web-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t upgrade yet!</title>
		<link>http://matt.thiessen.us/2009/06/dont-upgrade-yet/</link>
		<comments>http://matt.thiessen.us/2009/06/dont-upgrade-yet/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 13:23:14 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Admin]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=252</guid>
		<description><![CDATA[I know how tempting it is to press that upgrade button, but don&#8217;t do it without backing up those files. Backing up your files first is just too quick and easy to skip when doing it from the command line. Here&#8217;s how: Backup your MySQL database DATE=`date &#124; tr &#8221; &#8221; _` mysqldump -u root [...]]]></description>
			<content:encoded><![CDATA[<p>I know how tempting it is to press that upgrade button, but don&#8217;t do it without backing up those files.  Backing up your files first is just too quick and easy to skip when doing it from the command line.  Here&#8217;s how:</p>
<p><strong>Backup your MySQL database</strong><br />
<span style="color: #3366ff;">DATE=`date | tr &#8221; &#8221; _`<br />
mysqldump -u root -p DatabaseName &gt; DatabaseName.$DATE.sql</span></p>
<p><strong>Backup your web directory</strong><br />
<span style="color: #3366ff;">tar cvzf new_filename.tar.gz /var/www/thiessen.us/httpdocs</span></p>
<p><strong>c</strong> = create<br />
<strong>v</strong> = verbose<br />
<strong>z</strong> = compress<br />
<strong>f</strong> = filename is being provided</p>
<p>If you need to restore these files</p>
<p><strong>Restore MySQL database<br />
</strong><span style="color: #3366ff;">mysql -u root -p DatabaseName &lt; DatabaseName.Thu_Jun_11_08:14:41_CDT_2009.sql</span></p>
<p><strong>Restore the web directory</strong></p>
<p><span style="color: #3366ff;">cd /var/www/thiessen.us</span> (change directory to the location of the web directory)</p>
<p><span style="color: #3366ff;">mv httpdocs httpdocs_bad</span> (rename the current web directory)</p>
<p><span style="color: #3366ff;">tar -xzvf httpdocs.tar.gz</span> (uncompress the backup)</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/2009/06/dont-upgrade-yet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux and Apache commands</title>
		<link>http://matt.thiessen.us/2009/02/linux-and-apache-commands/</link>
		<comments>http://matt.thiessen.us/2009/02/linux-and-apache-commands/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:31:45 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://matt.thiessen.us/?p=148</guid>
		<description><![CDATA[Here are some commands that we use at the Gazette on our Linux web server.  It is running Red Hat Enterprise Linux 5.2. Reload Apache Conf file /etc/init.d/httpd reload Restart Apache apachectl -k graceful (didn&#8217;t work on Rackspace) Restart Apache from ssh /etc/rc.d/init.d/httpd restart Modify Apache conf file vi /etc/httpd/conf/httpd.conf vi commands i enter edit [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some commands that we use at the Gazette on our Linux web server.  It is running Red Hat Enterprise Linux 5.2.</p>
<div class="content">
<p>Reload Apache Conf file<br />
/etc/init.d/httpd reload</p>
<p>Restart Apache<br />
apachectl -k graceful (didn&#8217;t work on Rackspace)</p>
<p>Restart Apache from ssh<br />
/etc/rc.d/init.d/httpd restart</p>
<p>Modify Apache conf file<br />
vi /etc/httpd/conf/httpd.conf</p>
<p>vi commands<br />
i enter edit mode<br />
esc to exit edit mode (command mode)<br />
:wq to write changes and quit (in command mode)<br />
:!q quit without saving</p>
<p>Memory Use</p>
<p>free -t -m</p></div>
]]></content:encoded>
			<wfw:commentRss>http://matt.thiessen.us/2009/02/linux-and-apache-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

