<?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>RegencyHost Blog &#187; Time Stamp</title>
	<atom:link href="http://www.regencyhost.com/blog/tag/time-stamp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.regencyhost.com/blog</link>
	<description>A Leading cPanel Web Hosting Company</description>
	<lastBuildDate>Fri, 08 Oct 2010 06:36:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Daily/weekly/monthly Mysql database backup with cron</title>
		<link>http://www.regencyhost.com/blog/general-articles/daily-weekly-monthly-mysql-database-backup-with-cron.html</link>
		<comments>http://www.regencyhost.com/blog/general-articles/daily-weekly-monthly-mysql-database-backup-with-cron.html#comments</comments>
		<pubDate>Mon, 23 Nov 2009 15:27:26 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[General Articles]]></category>
		<category><![CDATA[Access Database]]></category>
		<category><![CDATA[auto backup mysql with cron]]></category>
		<category><![CDATA[Backup Mysql]]></category>
		<category><![CDATA[backup mysql databases]]></category>
		<category><![CDATA[Database Backup]]></category>
		<category><![CDATA[Database Name]]></category>
		<category><![CDATA[Database User]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Db Access]]></category>
		<category><![CDATA[Gz]]></category>
		<category><![CDATA[Mysql Database]]></category>
		<category><![CDATA[Password Database]]></category>
		<category><![CDATA[Privileges]]></category>
		<category><![CDATA[Scheduling]]></category>
		<category><![CDATA[Security Notes]]></category>
		<category><![CDATA[Smart]]></category>
		<category><![CDATA[Sql]]></category>
		<category><![CDATA[Time Stamp]]></category>

		<guid isPermaLink="false">http://www.regencyhost.com/blog/?p=52</guid>
		<description><![CDATA[Smart Mysql database backup with cron Create and assign a DB user to the DB you want to backup with all privileges from your Cpanel >> Mysql section. following is a simple script to take backup using cron. Just create the file, chmod it to 750 and execute it using cron. #============================ #/bin/bash /usr/bin/mysqldump –user=db_User [...]]]></description>
			<content:encoded><![CDATA[<p>Smart Mysql database backup with cron<br />
Create and assign a DB user to the DB you want to backup with all privileges from your Cpanel >> Mysql section.<br />
following is a simple script to take backup using cron. Just create the file, chmod it to 750 and execute it using cron.</p>
<p>#============================</p>
<p>#/bin/bash<br />
/usr/bin/mysqldump –user=db_User –password=xyz –databases db_name | gzip > /home/foo/db_name-`date “+%Y%m%d%H%M”`.sql.gz</p>
<p>#============================</p>
<p>where,<br />
db_user is your database user who has access on your database.<br />
db_name is the database name you are scheduling backup for.<br />
xyz is the actual password of above database user.<br />
+%Y%m%d%H%M is the time stamp which will help to distinguish between backup date and time.<br />
the backup destination in above example is “/home/foo/”</p>
<p>add following line in cron to take backup everyday at 23:00 and will store in separate file</p>
<p>0 23 * * * /PathToScript.sh</p>
<p>Security notes Note ::<br />
1) Dont use the command directly in cron. Put the command in a file and execute that file in cron.<br />
2) I asked to chmod to 750 so that other will not be able to view your files.<br />
If the file is readable by others anyone may view it and get your DB access very easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.regencyhost.com/blog/general-articles/daily-weekly-monthly-mysql-database-backup-with-cron.html/feed</wfw:commentRss>
		<slash:comments>126</slash:comments>
		</item>
	</channel>
</rss>

