<?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>Wilson Mattos&#187; hosting account backups</title>
	<atom:link href="http://www.wilsonmattos.com/tag/hosting-account-backups/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wilsonmattos.com</link>
	<description>Making Technology Simple</description>
	<lastBuildDate>Fri, 07 Jan 2011 10:06:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>How To Automate Your Web Server Backups</title>
		<link>http://www.wilsonmattos.com/how-to-automate-your-web-server-backups</link>
		<comments>http://www.wilsonmattos.com/how-to-automate-your-web-server-backups#comments</comments>
		<pubDate>Mon, 16 Mar 2009 05:40:50 +0000</pubDate>
		<dc:creator>Wilson Mattos</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[automated hosting account backups]]></category>
		<category><![CDATA[cpanel backups]]></category>
		<category><![CDATA[hosting account backups]]></category>
		<category><![CDATA[how to automate cpanel backups]]></category>
		<category><![CDATA[how to backup web server]]></category>
		<category><![CDATA[server backups]]></category>

		<guid isPermaLink="false">http://www.wilsonmattos.com/?p=3</guid>
		<description><![CDATA[Every once in a while I hear of someone losing their data because they neglected the fact that they need to perform backups on a regular basis.  One of friends calls me up one day and tells me she lost 10 years worth of pictures when her hard drive crashed and was begging for help. [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in a while I hear of someone losing their data because they neglected the fact that they need to perform backups on a regular basis.  One of friends calls me up one day and tells me she lost 10 years worth of pictures when her hard drive crashed and was begging for help. Luckily I was able to recover her pictures and other data, but she was lucky, because I had the right tools for the job and the drive was physically accessible.</p>
<p>When a web server crashes, it is a completely different story, because you are at the mercy of the hosting provider and you do not have physical access to the drive(s).  <strong>What most people do not realize is that their hosting provider does NOT backup their data.</strong> This is especially true of shared hosting&#8230;you know, the $10 per month type of accounts.  Well, now you know and I hope you will do something about it. Data protection isn&#8217;t fun, but neither is paying for insurance.  Consider your backups as insurance&#8230;it is a smart thing to do.</p>
<p>The best news is that is it very easy to automate this process.  I even created a short video with detailed instructions on how to get this done for cPanel-based hosting accounts.  The video is going to show you how to confiure the backup scripts on the server to perform daily backups, but that is just the first step.  In order for your backups to do you any good, you have to store them somewhere other than your server.  I show you how to do that as well.  If you have any questions, leave a comment on this page or ask me on Twitter (<a rel="nofollow" href="http://twitter.com/WilsonMattos" target="_blank">http://twitter.com/WilsonMattos</a>).</p>
<p style="text-align: center;"><h2 style="color: red;">Please visit website to view premium content</h2></p>
<p style="text-align: center;">
<h2>Resource Links</h2>
<p><strong>Auto FTP Manager: <a rel="nofollow" href="http://jumpclix.com/autoftp" target="_blank">Download Auto FTP Manager</a></strong></p>
<p><strong>cPanel-based Web Hosting: <a rel="nofollow" href="http://jumpclix.com/hostgator" target="_blank">Hostgator</a></strong></p>
<h2>Scripts</h2>
<p><strong>backup.sh</strong> (Note: everything goes in one line, just copy and paste from here):</p>
<p><textarea onclick="javascript:this.select();" cols="60">wget -O /dev/null -q &#8211;http-user=$1 &#8211;http-password=$2 http://localhost:2082/frontend/x3/backup/dofullbackup.html &#8211;post-data=&#8221;dest=homedir&amp;email=$3&#8243;</textarea></p>
<p><strong>Cron Job</strong> (Note: Do not remove the quotes):</p>
<p><textarea onclick="javascript:this.select();" cols="60">/bin/sh ~/backup.sh &#8220;USERNAME&#8221; &#8220;PASSWORD&#8221; &#8220;EMAILADDRESS&#8221;</textarea></p>
<h2>Video Transcript</h2>
<blockquote><p>In this short video I&#8217;m going to show you a very simple way to automatically back up all the data on your web hosting server including your website files, MySQL databases, blogs, etc.  So let&#8217;s go ahead and get started.</p>
<p>The very first step is to access the cPanel administration interface for your hosting account.  I&#8217;m using <a rel="nofollow" href="http://jumpclix.com/hostgator" target="_blank">HostGator</a> as my hosting provider, and I&#8217;m using the default HostGator skin.  The skin is the look and feel of your administration panel.  Your interface may look a little bit different depending on what skin you&#8217;ve chosen or who your hosting provider is, but it&#8217;ll have the same features that I am demonstrating here, like all of these icons, for example.</p>
<p>Find the &#8220;Find&#8221; box (I like to use it so I don&#8217;t have to scroll through all the icons) and type the word &#8220;File&#8221; in it.  Or just find the application called &#8220;File Manager.&#8221;  Go ahead and click on &#8220;File Manager,&#8221; and then click on &#8220;Go.&#8221;  When it comes up click the &#8220;New File&#8221; icon on the top left.  And then type the name &#8220;backup.sh&#8221;  Again, &#8220;backup.sh.&#8221;  Then click the &#8220;Create New File&#8221; button.  You will then be able to scroll down and find the &#8220;backup.sh&#8221; file you just created.  Notice it is zero bytes.  There&#8217;s nothing in it yet.  Check the box right next to it, and then let&#8217;s click the &#8220;Edit&#8221; button on the top of the screen.  Next,  click the &#8220;Edit&#8221; button on the window that comes up above the text editor.  Once the text editor is up, go ahead and copy the text that is underneath this video on this webpage in the box titled &#8220;backup.sh.&#8221;  Go ahead and just copy all of it and paste it right here, and do not make any modifications whatsoever to it, then go ahead and click on &#8220;Save Changes.&#8221;  Once that is done you can close the file manager window, and you can go ahead and close this window as well.</p>
<p>Now, let&#8217;s go back to our main cPanel window.  The next step is to search for the &#8220;cron&#8221; application.  There it is, &#8220;Cron Jobs.&#8221;  Go ahead and click on it and select the &#8220;Standard&#8221; button to schedule a job.  Now underneath this video there&#8217;s also a text box that is labeled &#8220;Cron Job.&#8221;  Go ahead and copy the contents of that box.  I&#8217;m going to just go ahead and type it here, and it&#8217;ll look like this.  And make sure to change the last three fields of this command.  The first one will be the user name, so my user name is this; my password, and then my e-mail address.  So go ahead and make sure you put values for yourself here.  The first couple of parts stay the same.  Then you put in your user name for cpanel.  This is your cPanel account, your cPanel password, and any e-mail address that you want the confirmation of your backup to be sent to.  Then you pick the date and time that this is going to occur.  So here you have the hour, so I have selected 3 AM.  Let&#8217;s go ahead and change it to 2 AM.  Actually, I want that to be 2:15 AM, so you select the hours and the minutes, so 2:15 AM.  I want to run it every day of every weekday, every month.  So the only changes here is the hours and minutes, and once I&#8217;m done I&#8217;m going to go ahead and &#8220;Save Crontab.&#8221;  That&#8217;s it.  I have now scheduled a job that will automatically back up my server on a daily basis.</p>
<p>So how do we get your backups?  Okay, so we go back to the main interface of the HostGator cPanel, and we&#8217;re going to go ahead and find an application called backups.  Here is the &#8220;Backups&#8221; application.  I&#8217;ll go ahead and click on it.  Then I will click on &#8220;Download or Generate a Full Backup.&#8221;  There are the backups that have automatically run.  These actually ran on November 18th, 2008, at 12:30am; 30 minutes past midnight November 20th; November 19th as well.  So in order for me to download the backups, I just click on the backup and save the file locally.  Now, as you can imagine this is another task for you to handle every day.  Not only do you have to download these backups, but you would also have to go ahead and go to file manager and delete them after you back them up, because otherwise they&#8217;re going to just fill up the disk space and take up all the disk space on your hosting account.  So let&#8217;s go ahead and automate this process as well.</p>
<p>The very first thing I&#8217;m going to do is I&#8217;m going to &#8220;My Documents,&#8221; and then I&#8217;m going to create a folder to store my backups.  So let me call this &#8220;Web Server Backups.&#8221;  You can call it whatever you like.  We&#8217;re going to use this in the next step.  And then I&#8217;m going to launch a little application called Auto FTP Manager.  I&#8217;ve included a link to this application below this video.  It&#8217;s a very cool little application, and they give you a free trial.  So what I&#8217;m using to record this video is the free trial.  And once you start the application a little wizard comes up.  And we&#8217;re going to choose &#8220;Create Automated Transfer Profile.&#8221;  It&#8217;s the second option, and I&#8217;m going to go ahead and click on &#8220;OK.&#8221;  What I want is an &#8220;Automated Transfer.&#8221;  I&#8217;ll go ahead and click on &#8220;Next.&#8221;  And then I have to browse where I want to store those backups.  So I just browse to the folder I created.  Again this doesn&#8217;t matter.  Call it whatever you&#8217;d like.  Click on &#8220;OK.&#8221;  And then I&#8217;ll choose &#8220;Next.&#8221;  &#8220;FTP Server&#8221; is the correct choice on this screen, so I&#8217;ll just go ahead and click on &#8220;Next.&#8221;  And then it wants me to type in the information for the FTP Server.  So I&#8217;ll just type in my domain information, and my user name, and my password.  Okay, and then I will select the FTP folder directory I want to back up.  I&#8217;ll just say slash – Now this is the next very important step here under select sub-folders and files to include or exclude, go ahead and click on &#8220;Configure.&#8221;  And the very first thing we want to do is click on &#8220;Deselect All.&#8221;  This is important.  You don&#8217;t want anything selected.  Now, if you have backups that you have already created like I have, for example, like I showed you before.  Then you want to check them to make sure that they get transferred, because otherwise they won&#8217;t get transferred the first time.  If you haven&#8217;t created a backup yet, because your scheduled job on the server that we just created hasn&#8217;t run, then don&#8217;t worry about this.  But I already have three backups, and I want them to be transferred.  So I&#8217;ll go ahead and put check boxes right next to those.  Click on &#8220;OK,&#8221; and the names of those backups were right here, so I knew what they were.  Go ahead and click on &#8220;Next.&#8221;  The default action here is not what we want.  We want the transfer files from my domain, whatever your domain is called, to your machine.  And then we want to select here the delete file from my domain after transfer.  This automatically does the cleanup for you that I talked about, so that you&#8217;re not filling out your entire quota on your hosting account.</p>
<p>Okay, then we have to set a filter, so that we transfer the right file types.  I&#8217;m going to go ahead and click on &#8220;Configure,&#8221; and I&#8217;m going to select &#8220;File Type.&#8221;  I&#8217;m going to say &#8220;Include&#8221; rather than exclude, so I would like to &#8220;Include.&#8221;  And then I&#8217;ll come here and type &#8220;.gz.&#8221;  So I want to add files of type &#8220;.gz.&#8221;  So it says now to include .gz.  And this will always just grab those files for you.  Then we&#8217;re going to go ahead and schedule this.  We don&#8217;t want to schedule just once, so we want to say &#8220;Daily.&#8221;  As you can see this is a pretty cool application.  You can set up custom intervals; monthly, weekly, whatever you want.  So I&#8217;m going say &#8220;Daily.&#8221;  It&#8217;s 12:42, so let&#8217;s go ahead and make it the 12:43 schedule.  It&#8217;s going to occur every &#8220;1&#8243; day, and it is enabled.  And then we&#8217;ll go ahead and click on &#8220;Next.&#8221;  We&#8217;ll specify a name for this profile.  Let me just call it HostGator, since this is what I&#8217;m backing up.  You can call it again whatever you want.  We don&#8217;t want to do anything after we&#8217;re finished.  We&#8217;re just going to go ahead and &#8220;Finish&#8221; this, and as you can see here you have an automatic transfer profile.  If you wanted to change a schedule or anything like that, you could right-click and edit that profile.  Let&#8217;s take a look at the scheduled profile, and this tells us when it&#8217;s going to run.  It&#8217;s about to run, so we just made that schedule; ten seconds.  This should now transfer those files, delete them from our hosting account, so that everything is cleaned up.  So here we go.  It&#8217;s running, and it shows us what is going to happen.  It&#8217;s scanning the files.  Look, it found the files.  It is transferring the files now.  It is transferring all my backup files.  And if we scroll here, file completed.  Everything&#8217;s completed.  Transfer completed and then file deleted.  And we can go ahead and close this log.  You can close this application.  It doesn&#8217;t actually terminate the application.  It stays running in your system tray.  This is required in order for the job to run next time.  And if we go to the scheduled profiles again, it says that in 23 hours, 59 minutes, and 20 seconds it&#8217;s going to run again.  So we want to make sure that this application stays running, so that the scheduled jobs can run.</p>
<p>If we go back to the HostGator cPanel, we should see that those backups are no longer there.  So we&#8217;ve cleaned up our home directory and removed the generated full backups.  We no longer have a backup here.  We&#8217;ve transferred them all.  If I go to my documents and look at my web server backups, I can see that the files are there.  This is my backup that I can use to restore my web server.  That&#8217;s how simple that is.  I hope you enjoyed the video and that this process serves you very well.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.wilsonmattos.com/how-to-automate-your-web-server-backups/feed</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>

