<?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>Sean&#039;s Blog &#187; shell</title>
	<atom:link href="http://seanbehan.com/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +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>Backup and Rotate MySQL Databases Simple Bash Script</title>
		<link>http://seanbehan.com/databases/backup-and-rotate-mysql-databases-simple-bash-script/</link>
		<comments>http://seanbehan.com/databases/backup-and-rotate-mysql-databases-simple-bash-script/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 16:29:48 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=1343</guid>
		<description><![CDATA[Make a directory ( it can anywhere ) called baks/mysql mkdir -p /baks/mysql Create a file (it can be anywhere) called /root/mysql_backups.sh and put this script in it #!/bin/bash # modify the following to suit your environment export DB_BACKUP=&#34;/baks/mysql&#34; export DB_USER=&#34;root&#34; export DB_PASSWD=&#34;your-mysql-password-goes-here&#34; # title and version echo &#34;&#34; echo &#34;Backup and rotate all mysql [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fdatabases%2Fbackup-and-rotate-mysql-databases-simple-bash-script%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Backup and Rotate MySQL Databases Simple Bash Script" data-url="http://seanbehan.com/databases/backup-and-rotate-mysql-databases-simple-bash-script/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Make a directory ( it can anywhere ) called baks/mysql</p>
<pre class="wp-code-highlight prettyprint">
mkdir -p /baks/mysql
</pre>
<p>Create a file (it can be anywhere) called /root/mysql_backups.sh and put this script in it</p>
<pre class="wp-code-highlight prettyprint">
#!/bin/bash

# modify the following to suit your environment
export DB_BACKUP=&quot;/baks/mysql&quot;
export DB_USER=&quot;root&quot;
export DB_PASSWD=&quot;your-mysql-password-goes-here&quot;

# title and version
echo &quot;&quot;
echo &quot;Backup and rotate all mysql databases&quot;
echo &quot;--------------------------&quot;

rm -rf $DB_BACKUP/04
mv $DB_BACKUP/03 $DB_BACKUP/04
mv $DB_BACKUP/02 $DB_BACKUP/03
mv $DB_BACKUP/01 $DB_BACKUP/02
mkdir $DB_BACKUP/01

echo &quot;* Creating backup...&quot;
mysqldump --user=$DB_USER --password=$DB_PASSWD --all-databases | bzip2 &gt; $DB_BACKUP/01/mysql-`date +%Y-%m-%d`.bz2
echo &quot;----------------------&quot;
echo &quot;Done&quot;
exit 0
</pre>
<p>Install it via cron and have it run at 3:10 am every morning.</p>
<pre class="wp-code-highlight prettyprint">
crontab -e

10 3 * * * /root/mysql_backups.sh  &gt; /baks/status.log
</pre>
<p>This script will save the last 4 days of data.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/databases/backup-and-rotate-mysql-databases-simple-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get Your User&#039;s SHELL and PATH Information</title>
		<link>http://seanbehan.com/linux/how-to-get-your-users-shell-and-path-information/</link>
		<comments>http://seanbehan.com/linux/how-to-get-your-users-shell-and-path-information/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 03:48:22 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=433</guid>
		<description><![CDATA[How to find your user SHELL and PATH on Linux echo $PATH echo $SHELL Which will print the paths to the screen /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games /bin/bash]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fhow-to-get-your-users-shell-and-path-information%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="How to Get Your User&#039;s SHELL and PATH Information" data-url="http://seanbehan.com/linux/how-to-get-your-users-shell-and-path-information/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>How to find your user SHELL and PATH on Linux</p>
<pre class="wp-code-highlight prettyprint">
echo $PATH
echo $SHELL
</pre>
<p>Which will print the paths to the screen</p>
<pre class="wp-code-highlight prettyprint">
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
/bin/bash
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/how-to-get-your-users-shell-and-path-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

