<?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>gHacks technology news &#187; backup-solution</title>
	<atom:link href="http://www.ghacks.net/tag/backup-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Wed, 25 Nov 2009 14:38:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Back up your Apache web directory and database with this simple script</title>
		<link>http://www.ghacks.net/2009/01/22/back-up-your-apache-web-directory-and-database-with-this-simple-script/</link>
		<comments>http://www.ghacks.net/2009/01/22/back-up-your-apache-web-directory-and-database-with-this-simple-script/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 18:58:34 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorials Advanced]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[automated backups]]></category>
		<category><![CDATA[backup-solution]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[tar]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=10060</guid>
		<description><![CDATA[I administer a lot of web sites. And all of these web sites need backup solutions. Since most of those web sites use LAMP servers it only made sense to set up a backup system using the available, included open source tools. It didn&#8217;t take long to create a solid backup system and, with the [...]]]></description>
			<content:encoded><![CDATA[<p>I administer a lot of web sites. And all of these web sites need backup solutions. Since most of those web sites use LAMP servers it only made sense to set up a backup system using the available, included open source tools. It didn&#8217;t take long to create a solid backup system and, with the help of cron, automate that system so that Apache&#8217;s document root and the website databases were backed up regularly and without user intervention.</p>
<p>The script made use of the following tools: date, cat, tar, mv, and rm. That&#8217;s it. The script will create backups with the date in the file name and then move the backups to a central location. Without further adieu, let&#8217;s get to the script.</p>
<p><span id="more-10060"></span><em>#! /bin/sh</em></p>
<p><em>TMP=&#8221;/tmp/&#8221;</em></p>
<p><em>#Format the date in YEAR-MO-DY format<br />
TODAY=`date +%F`</em></p>
<p><em># Check to see if there is a lastbackup file in /tmp, if not create it,<br />
# if so then set LAST equal to $TODAY<br />
if [ -f /tmp/lastbackup ]; then<br />
LAST=`cat /tmp/lastbackup`<br />
else<br />
LAST=$TODAY<br />
fi</em></p>
<p><em># Set the web directory backup name to the following<br />
WEB_FILENAME=&#8221;inc-&#8221;$TODAY&#8221;-web.tar.gz&#8221;</em></p>
<p><em># Set database backup name to the following<br />
DB_FILENAME=&#8221;inc-&#8221;$TODAY&#8221;-db.tar.gz&#8221;</em></p>
<p><em># this tars up my web directory into web.tar.gz tarball.<br />
/bin/tar -czf $TMP$WEB_FILENAME &#8211;after-date=$LAST /var/www/html</em></p>
<p><em># Move the web back to the backup directory<br />
/bin/mv $TMP$WEB_FILENAME /data</em></p>
<p><em># Remove web backup file from temp director<br />
rm $TMP$WEB_FILENAME</em></p>
<p><em># this tars up my database directory into $TODAY-db.tar.gz tarball.<br />
/bin/tar -czf $TMP$DB_FILENAME &#8211;after-date=$LAST /var/lib/mysql</em></p>
<p><em># Move the backup database to the backup directory<br />
/bin/mv $TMP$DB_FILENAME /data</em></p>
<p><em># Remove web backup file from temp directory<br />
rm $TMP$DB_FILENAME<br />
</em></p>
<p>What I wanted this to do is create daily backups and move the backups to the <strong>/data</strong> directory on the drive housing the server. These backups will be saved for one month. After the month is completed i have a second script that deletes the months backups prior to running the next backup (so there is always a backup to fall to). How I made use of this script is simple. I save the script (called <strong>backup.sh</strong>) in the root user directory and create a second script called <strong>rm_backups.sh</strong> that looks like this:</p>
<p><em>#! /bin/sh</em></p>
<p><em>rm /data/*gz</em></p>
<p>With these two files in place I create two cron entries. The first cron entry is for running the <strong>backup.sh</strong> script and looks like:</p>
<p>0 23 * * *     ~/backup.sh</p>
<p>The second cron entry is for running the <strong>rm_backups.sh</strong> script and looks like:</p>
<p>0 20 1 * *     ~/rm_backups.sh</p>
<p>Both of the above cron jobs are created as the root user.</p>
<p><strong>Final Thoughts</strong></p>
<p>Naturally this solution could be easily modified (using such tools rsync) to set up an offsite backup solution. What should be obvious is that creating a simple, flexible server backup system on Linux is easy. With the help of a little ingenuity, you can create your own automated backup service.</p>

	Tags: <a href="http://www.ghacks.net/tag/automated-backups/" title="automated backups" rel="tag">automated backups</a>, <a href="http://www.ghacks.net/tag/backup-solution/" title="backup-solution" rel="tag">backup-solution</a>, <a href="http://www.ghacks.net/tag/backups/" title="backups" rel="tag">backups</a>, <a href="http://www.ghacks.net/tag/cat/" title="cat" rel="tag">cat</a>, <a href="http://www.ghacks.net/tag/cron/" title="cron" rel="tag">cron</a>, <a href="http://www.ghacks.net/tag/date/" title="date" rel="tag">date</a>, <a href="http://www.ghacks.net/tag/lamp/" title="LAMP" rel="tag">LAMP</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/tar/" title="tar" rel="tag">tar</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/01/11/using-cron-to-automate-linux-tasks/" title="Using Cron to Automate Linux Tasks (January 11, 2009)">Using Cron to Automate Linux Tasks</a> (7)</li>
	<li><a href="http://www.ghacks.net/2009/02/15/quick-archiving-in-gnome/" title="Quick Archiving in GNOME (February 15, 2009)">Quick Archiving in GNOME</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/10/10/linux-back-in-time-backup-made-easy/" title="Linux Back In Time: Backup made easy (October 10, 2009)">Linux Back In Time: Backup made easy</a> (1)</li>
	<li><a href="http://www.ghacks.net/2009/02/19/installing-firefox-and-flash-from-source/" title="Installing Firefox and Flash From Source (February 19, 2009)">Installing Firefox and Flash From Source</a> (8)</li>
	<li><a href="http://www.ghacks.net/2008/12/20/install-phpmyadmin-for-easy-mysql-administration/" title="Install phpmyadmin for easy MySQL administration (December 20, 2008)">Install phpmyadmin for easy MySQL administration</a> (6)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/01/22/back-up-your-apache-web-directory-and-database-with-this-simple-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do Specific Data Backups With Tame</title>
		<link>http://www.ghacks.net/2008/07/15/do-specific-data-backups-with-tame/</link>
		<comments>http://www.ghacks.net/2008/07/15/do-specific-data-backups-with-tame/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 20:55:28 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[auto backup]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backup server]]></category>
		<category><![CDATA[backup software]]></category>
		<category><![CDATA[backup-solution]]></category>
		<category><![CDATA[net backup]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=5343</guid>
		<description><![CDATA[Tame is a specialized backup solution that can monitor applications and perform backups once those applications close. It would for instance be possible to monitor Firefox, Opera or Internet Explorer and make a backup of the profiles once the applications are closed by the user. Other variants include instant messengers and their logs, ftp clients, [...]]]></description>
			<content:encoded><![CDATA[<p>Tame is a specialized backup solution that can monitor applications and perform backups once those applications close. It would for instance be possible to monitor <a href="http://www.ghacks.net/tag/firefox/">Firefox</a>, <a href="http://www.ghacks.net/category/browsing/opera/">Opera</a> or <a href="http://www.ghacks.net/tag/internet-explorer/">Internet Explorer</a> and make a backup of the profiles once the applications are closed by the user. Other variants include instant messengers and their logs, ftp clients, p2p applications and everything else that is writing data during use.</p>
<p>Tame is easy to use. Just install the application on your system and pick an application from one of the running processes. That application will be monitored from then on. The only other information that have to be specified are the folder that should be backed up after that process terminates and the backup folder that will contain the backup of the data.</p>
<p>That&#8217;s pretty easy, ain&#8217;t it? The While that is the main use of Tame it does offer another way to backup files. Next to the so called Program Closing Backups System Timed Applications are available.</p>
<p><span id="more-5343"></span><div id="attachment_5344" class="wp-caption alignnone" style="width: 510px"><img src="http://www.ghacks.net/wp-content/uploads/2008/07/tame_ss-500x383.jpg" alt="tame" title="tame" width="500" height="383" class="size-medium wp-image-5344" /><p class="wp-caption-text">tame</p></div></p>
<p>This comes closer to normal backup operations on a system. The user can specify a time, a folder that should be backed up and a destination folder for the backup data and the backups will be started at that time if the computer is running. Folders can be local folders or folders on a network or backup server.</p>
<p>Tame requires the Microsoft .net framework 2.0 or higher. No information on operating system compatibility. It runs fine on Windows XP Service Pack 3.</p>

	Tags: <a href="http://www.ghacks.net/tag/auto-backup/" title="auto backup" rel="tag">auto backup</a>, <a href="http://www.ghacks.net/tag/backup/" title="backup" rel="tag">backup</a>, <a href="http://www.ghacks.net/tag/backup-server/" title="backup server" rel="tag">backup server</a>, <a href="http://www.ghacks.net/tag/backup-software/" title="backup software" rel="tag">backup software</a>, <a href="http://www.ghacks.net/tag/backup-solution/" title="backup-solution" rel="tag">backup-solution</a>, <a href="http://www.ghacks.net/tag/net-backup/" title="net backup" rel="tag">net backup</a>, <a href="http://www.ghacks.net/tag/software/" title="software" rel="tag">software</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/10/02/windows-backup-software-deltacopy/" title="Windows Backup Software DeltaCopy (October 2, 2008)">Windows Backup Software DeltaCopy</a> (11)</li>
	<li><a href="http://www.ghacks.net/2009/04/26/the-10-best-windows-backup-software-programs/" title="The 10 Best Windows Backup Software Programs (April 26, 2009)">The 10 Best Windows Backup Software Programs</a> (78)</li>
	<li><a href="http://www.ghacks.net/2008/04/05/idle-backup/" title="Idle Backup (April 5, 2008)">Idle Backup</a> (6)</li>
	<li><a href="http://www.ghacks.net/2009/06/22/google-docs-backup-software/" title="Google Docs Backup Software (June 22, 2009)">Google Docs Backup Software</a> (37)</li>
	<li><a href="http://www.ghacks.net/2007/02/17/zip-encrypt-ftp-backups/" title="Zip Encrypt Ftp Backups (February 17, 2007)">Zip Encrypt Ftp Backups</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/07/15/do-specific-data-backups-with-tame/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zip Encrypt Ftp Backups</title>
		<link>http://www.ghacks.net/2007/02/17/zip-encrypt-ftp-backups/</link>
		<comments>http://www.ghacks.net/2007/02/17/zip-encrypt-ftp-backups/#comments</comments>
		<pubDate>Sat, 17 Feb 2007 05:44:46 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backup-solution]]></category>
		<category><![CDATA[didier-stevens]]></category>
		<category><![CDATA[ftp-backup]]></category>
		<category><![CDATA[secure-backup]]></category>
		<category><![CDATA[site-backup]]></category>
		<category><![CDATA[zipencryptftp]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2007/02/17/zip-encrypt-ftp-backups/</guid>
		<description><![CDATA[Didier Stevens did it again with a pretty useful tool that could be used for backups that should be placed on another server on the internet. This is great if you want to separate site or operating system backups from the running server to avoid that both are not recoverable after a crash.]]></description>
			<content:encoded><![CDATA[<p><a href="http://didierstevens.wordpress.com/programs/zipencryptftp/" target="_blank">Didier Stevens</a> did it again with a pretty useful tool that could be used for backups that should be placed on another server on the internet. This is great if you want to separate site or operating system backups from the running server to avoid that both are not recoverable after a crash.</p>
<p><em>ZIPEncryptFTP is a C# command-line program, you will need the .NET 2.0 framework runtime to run it. It will write to the Application eventlog, so you need to run it the first time with administrator privileges, to register ZIPEncryptFTP with the eventlog.</em></p>
<p><span id="more-1212"></span>To use the program you will have to use the command line. If you wanted for instance to backup the contents of the directory c:\temp, use the password:test to encrypt the folder(s) with AES and upload it to the ftp 192.168.1.100 with the username test and the password pass you would do the following:</p>
<p>ZIPEncryptFTP /directory:c:\test /password:test /url:<a href="ftp://192.168.1.100" class="linkification-ext" title="Linkification: ftp://192.168.1.100">ftp://192.168.1.100</a> /ftpuser:test /ftppassword:pass</p>
<p>You can add more than one directory by simply adding another /directory parameter to ZipEncryptFtp.</p>
<p>You can use ZipEncryptFtp to encrypt the data again but it needs to be retrieved with a ftp program before. To decode the file you need to use the following command:</p>
<p>ZIPEncryptFTP /password:test /infile:test /outfile:test.zip</p>
<p><em>Everything is done in memory, no temporary (ZIP) files are created. The ZIP file is created and encrypted in memory.</em></p>
<p><em>The password is converted to a 256 bit key, and the initialization vector is generated at random. The effect of this is that encrypting the same file twice will yield 2 completely different encrypted files.</em></p>

	Tags: <a href="http://www.ghacks.net/tag/backup/" title="backup" rel="tag">backup</a>, <a href="http://www.ghacks.net/tag/backup-solution/" title="backup-solution" rel="tag">backup-solution</a>, <a href="http://www.ghacks.net/tag/didier-stevens/" title="didier-stevens" rel="tag">didier-stevens</a>, <a href="http://www.ghacks.net/tag/ftp-backup/" title="ftp-backup" rel="tag">ftp-backup</a>, <a href="http://www.ghacks.net/tag/secure-backup/" title="secure-backup" rel="tag">secure-backup</a>, <a href="http://www.ghacks.net/tag/site-backup/" title="site-backup" rel="tag">site-backup</a>, <a href="http://www.ghacks.net/tag/zipencryptftp/" title="zipencryptftp" rel="tag">zipencryptftp</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2008/07/15/do-specific-data-backups-with-tame/" title="Do Specific Data Backups With Tame (July 15, 2008)">Do Specific Data Backups With Tame</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/10/03/yadis-backup-software/" title="Yadis! Backup Software (October 3, 2009)">Yadis! Backup Software</a> (2)</li>
	<li><a href="http://www.ghacks.net/2009/04/24/windows-backup-software-backup-maker/" title="Windows Backup Software: Backup Maker (April 24, 2009)">Windows Backup Software: Backup Maker</a> (18)</li>
	<li><a href="http://www.ghacks.net/2008/10/02/windows-backup-software-deltacopy/" title="Windows Backup Software DeltaCopy (October 2, 2008)">Windows Backup Software DeltaCopy</a> (11)</li>
	<li><a href="http://www.ghacks.net/2008/09/06/windows-backup-software/" title="Windows Backup Software (September 6, 2008)">Windows Backup Software</a> (11)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2007/02/17/zip-encrypt-ftp-backups/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
