<?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>ServePath Blog &#187; Technical Documentation</title>
	<atom:link href="http://blog.servepath.com/category/technical-documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.servepath.com</link>
	<description>Home of the 10,000% Guarantee</description>
	<lastBuildDate>Mon, 28 Sep 2009 19:13:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=6152</generator>
		<item>
		<title>10 Things You Should Secure on Your Linux Server</title>
		<link>http://blog.servepath.com/2008/02/13/10-things-you-should-secure-on-your-linux-server/</link>
		<comments>http://blog.servepath.com/2008/02/13/10-things-you-should-secure-on-your-linux-server/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 19:05:17 +0000</pubDate>
		<dc:creator>Bryan Levine</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technical Documentation]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[access control]]></category>
		<category><![CDATA[accounts]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[knowledge base]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[RedHat]]></category>
		<category><![CDATA[secure server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.servepath.com/2008/02/13/10-things-you-should-secure-on-your-linux-server/</guid>
		<description><![CDATA[<p><strong><u><img src="http://blog.servepath.com/wp-content/uploads/2008/02/linux-logos.gif" style="border-width: 0px" alt="linux_logos" border="0" height="115" width="400" /></u></strong></p>
<p><em>Note: this post has been updated slightly to correct some minor errors. Also, commands may have been improperly formated due to WordPress&#8217;s treatment as such. Converted now to &#8220;code&#8221; formating. </em></p>
<p><strong><u>1.    Software Firewall</u></strong> &#8211; For security purposes, the software-based firewall that is included in all freshly deployed dedicated server operating system has been enabled and configured to allow on the minimal amount of connectivity required for you to access and configure your server. For Linux/UNIX users, this means that port 22 is permitting SSH connections. Port 80 (HTTP/Web) and port 443 (HTTPS/SSL Web) have been opened to allow all standard web traffic. In addition, the required ports for control panel access have been opened if you have ordered a control panel from ServePath. Finally, ICMP Ping has been permitted to allow our monitoring services the necessary access to aid in managing out network.</p>
<p><strong><u>2.    File Permission</u></strong> &#8211; There are certain files whose presence in the Linux file system can present a security risk and should be remedied as soon as possible. When the SUID (set user ID) or SGID (set group ID) bits are set on an executable, that program executes with the UID or GID of owner of the file as opposed to the user executing it. This means that all executables with SUID bit set and are owned by root are executed with the UID of root. This situation is a security risk and should be minimized unless the program is designed for this risk. To find all files on your file system that have the SUID or SGID bit set, execute the command:</p>
<blockquote>
<pre><strong># find / -path /proc –prune –o –type f –perm +6000 –ls</strong></pre>
</blockquote>
<p>It is good practice to generate a list of SUID or SGID files on your server as soon as possible and re-run the above command on a regular basis to ensure new binaries with unsafe permissions are not being added to your server. World-writable files are a security risk as well. World-writable files and directories are dangerous since it allows anyone to modify them. World-writable directories allow anyone to add or delete files. To find all world-writable files and directories, execute the command:</p>
<blockquote>
<pre><strong><strike># find / -path /proc –prune –o –perm -2 ! –type 1 –ls</strike>
 </strong><strong># find / -path /proc –prune –o –perm -2 ! –type l –ls</strong></pre>
</blockquote>
<p>Another file permission issue is when files are not owned by any user or group. While this is not technically a security vulnerability, an audited system should not contain any unowned files. This is to prevent the situation where a new user is assigned a previous user’s UID so that the previous owner’s files, if any, are all owned by the new user. To find all files that are not owned by any user or group, execute the command:</p>
<blockquote>
<pre><strong><strike># find / -path /proc –prune –o –nouser –o –nogroup\</strike>
 </strong><strong># find / -path /proc –prune –o –nouser –o –nogroup</strong></pre>
</blockquote>
<p><strong><u>3.    Listening Ports</u></strong> &#8211; It is very important to ensure that all listening ports on your server are limited to only those that are necessary for you’re your server and its applications. To get a list of listening network ports, run the following command:</p>
<blockquote>
<pre><strong># netstat –tulp</strong></pre>
</blockquote>
<p>Disable any ports that are not necessary. To do so, kill the PID (process ID) shown by netstat. The only port that your server must be listening on is SSH (port 22/tcp). Other ports that will need to be listening depend upon the specific purpose of your dedicated server. Note that by killing the PID of the process you are not preventing your server from starting the same service again on bootup. In order to see what programs your server is launching on startup, execute the following command:</p>
<blockquote>
<pre><strike><strong># chkconfig –list |grep on</strong> (Red Hat systems)</strike>
 <strong># chkconfig –list | grep on</strong> (Red Hat systems)</pre>
<pre><strong># ls -l /etc/rc2.d/S* | cut -d/ -f6</strong> (Debian systems)</pre>
</blockquote>
<p>This command will show you which programs are to be executed in which run levels. In Red Hat, full multi-user mode is 3. To disable a service permanently, issue the following command:</p>
<blockquote><p><strong># chkconfig &lt;service_name&gt;</strong> off where <strong>&lt;service_name&gt;</strong> equals the name of your service, such as <strong>httpd</strong></p></blockquote>
<p>To disable any service in Debian, simply execute the following command:</p>
<blockquote>
<pre><strong># rm –f /etc/rc2.d/S*&lt;service_name&gt;</strong></pre>
</blockquote>
<p>Please note that the above commands do not actually disable the service, they simply prevent the service from being executed on startup.</p>
<p><strong><u>4.    Unlocked User Accounts</u></strong> &#8211; The first thing you should take stock of on a new server are the users with unlocked accounts. Users with unlocked accounts are allowed to login if assigned a valid shell, and should be kept to a minimum. To get a list of unlocked users, execute the following command:</p>
<blockquote>
<pre><strong><strike># egrep –v ‘.*:\*|:!' /etc/shadow|awk -F: '{print $1}'</strike>
 </strong><strong># egrep –v '.*:\* | :!' /etc/shadow | awk -F: '{print $1}'</strong></pre>
</blockquote>
<p>If you do not recognize any user returned by the above command, check to see if that user owns any files by executing the command:</p>
<blockquote>
<pre><strong># find / -path /proc -prune -o -user &lt;user_name&gt; -ls</strong> where <strong>&lt;username&gt;</strong> is the name of the user you do not recognize, such as <strong>jdoe</strong></pre>
</blockquote>
<p>If the user does not own any files, or files that will not hinder the stability of your server, delete the user by executing the command:</p>
<blockquote>
<pre><strong># userdel –r &lt;user_name&gt;</strong></pre>
</blockquote>
<p><strong><u>5.    Enable/Disable Features</u></strong> &#8211; All of the following lines and values should be added to the file /etc/sysctl.conf if you want to enable or disable the feature mentioned. You will need to restart your system for these changes to take effect:</p>
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td valign="top" width="200">TCP SYN Cookie Protection</td>
<td valign="top" width="200">net.ipv4.tcp_syncookies = 1</td>
</tr>
<tr>
<td valign="top" width="200">Disable IP Source Routing</td>
<td valign="top" width="200">net.ipv4.conf.all.accept_source_router = 0</td>
</tr>
<tr>
<td valign="top" width="200">Disable ICMP Redirect Acceptance</td>
<td valign="top" width="200">net.ipv4.conf.all.accept_redirects = 0</td>
</tr>
<tr>
<td valign="top" width="200">IP Spoofing Protection</td>
<td valign="top" width="200">net.ipv4.conf.all.rp_filter = 1</td>
</tr>
<tr>
<td valign="top" width="200">Ignoring Broadcasts Request</td>
<td valign="top" width="200">net.ipv4.icmp_echo_ignore_broadcasts=1</td>
</tr>
<tr>
<td valign="top" width="200">Bad Error Message Protection</td>
<td valign="top" width="200">net.ipv4.icmp_ignore_bogus_error_response = 1</td>
</tr>
</table>
<p><strong><u>6.    Basic Access Control</u></strong> &#8211; One of the most important things you can do to protect your server is to implement very basic access control. Access control can eliminate a majority of the risk involved in running out of date services on the Internet. In order to implement an effective access control policy on your dedicated server, you will need the following pieces of information: The IP address or addresses of your Internet connection. For some, this may be one static address, while for others it is a pool of addresses. If you have more than one Internet connection, please be sure to get ALL the IP addresses you could be assigned at any time. You may need to contact your Internet Service Provider for this information.</p>
<p><strong><u>7.    Restrict SSH Connections</u></strong> &#8211; While we do not recommend anybody running outdated software, especially something as crucial as SSH, a not insignificant portion of the risks involved in running an outdated SSH server can be mitigated by only allowing certain IP networks to access your SSH server via iptables. Execute the following command to only allow SSH connections from certain IP address:</p>
<blockquote>
<pre><strong># $IPTABLES –A INPUT –p tcp –dport 22 –s &lt;X.X.X.X/NN&gt; –j ACCEPT</strong></pre>
</blockquote>
<p>The above line will allow TCP packets destined for port 22 to be accepted if and only if the source of the packets are within the network denoted in <strong>&lt;X.X.X.X/NN&gt;</strong>. If you have more than one Internet connection, or have multiple networks, simply add another line, replacing <strong>&lt;X.X.X.X/NN&gt;</strong> with the proper values.</p>
<p><strong><u>8.    Access Control on Control Panel</u></strong> &#8211; If your server is running a control panel, you can also improve your security by implementing an access control policy on the control panel administrative port.</p>
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td valign="top" width="55">
<pre>Plesk:</pre>
</td>
<td valign="top" width="343">
<pre><strong>$IPTABLES –A INPUT –p tcp –dport 8443 –s X.X.X.X/NN –j ACCEPT</strong></pre>
</td>
</tr>
<tr>
<td valign="top" width="55">
<pre>Ensim:</pre>
</td>
<td valign="top" width="343">
<pre><strong>$IPTABLES –A INPUT –p tcp –dport 19638 –s X.X.X.X/NN –j ACCEPT</strong></pre>
</td>
</tr>
<tr>
<td valign="top" width="55">
<pre>Cpanel:</pre>
</td>
<td valign="top" width="343">
<pre><strong>$IPTABLES –A INPUT –p tcp –dport 2082 –s X.X.X.X/NN –j ACCEPT</strong></pre>
</td>
</tr>
</table>
<p><strong><u>9.    Access Control on FTP</u></strong> &#8211; Another service you may want to implement an access control policy on is FTP. If you or a small handful of people are the only allowed users to FTP into your dedicated server, then you will certainly benefit from employing some iptables rules by entering the commands:</p>
<blockquote>
<pre><strong>$IPTABLES –A INPUT –p tcp –s X.X.X.X/NN –dport 20 –syn –j ACCEPT
 $IPTABLES –A INPUT –p tcp –s X.X.X.X/NN –dport 21 –syn –j ACCEPT</strong></pre>
</blockquote>
<p>Note that both of the above lines must be executed for each source network.</p>
<p><strong><u>10.    Enable IPTABLES</u></strong> &#8211; Lastly, if you do not have a hardware firewall you will want to enable <strong>iptables</strong>, the software firewall in Linux systems. For a detailed iptables tutorial from ServePath, please visit our Support Center pages at: <a href="http://www.servepath.com/support/iptables.htm">http://www.servepath.com/support/iptables.htm</a>.</p>
<p>Hope that helps you get your Linux Server get even more secured! For other helpful tips like this, be sure to visit the ServePath <a href="http://www.servepath.com/support/knowledgebase_home.htm" title="Knowledge Base" target="_blank">Knowledge Base</a>.</p>
<div style="display:block"><small><em><strong>Thank you for your interest in the ServePath blog. Please note that all of our most recent content is now on the <a href="http://blog.gogrid.com">GoGrid blog</a>. We recommend that you visit that site and subscribe to the <a href="http://blog.gogrid.com/feed">GoGrid blog feed</a>. This blog will no longer be updated so we encourage you to read up on GoGrid Cloud and Dedicated Infrastructure hosting on-demand at: <a href="http://www.gogrid.com">http://www.gogrid.com</a>.</strong></em></small></div>]]></description>
			<content:encoded><![CDATA[<p><strong><u><img src="http://blog.servepath.com/wp-content/uploads/2008/02/linux-logos.gif" style="border-width: 0px" alt="linux_logos" border="0" height="115" width="400" /></u></strong></p>
<p><em>Note: this post has been updated slightly to correct some minor errors. Also, commands may have been improperly formated due to WordPress&#8217;s treatment as such. Converted now to &#8220;code&#8221; formating. </em></p>
<p><strong><u>1.    Software Firewall</u></strong> &#8211; For security purposes, the software-based firewall that is included in all freshly deployed dedicated server operating system has been enabled and configured to allow on the minimal amount of connectivity required for you to access and configure your server. For Linux/UNIX users, this means that port 22 is permitting SSH connections. Port 80 (HTTP/Web) and port 443 (HTTPS/SSL Web) have been opened to allow all standard web traffic. In addition, the required ports for control panel access have been opened if you have ordered a control panel from ServePath. Finally, ICMP Ping has been permitted to allow our monitoring services the necessary access to aid in managing out network.</p>
<p><strong><u>2.    File Permission</u></strong> &#8211; There are certain files whose presence in the Linux file system can present a security risk and should be remedied as soon as possible. When the SUID (set user ID) or SGID (set group ID) bits are set on an executable, that program executes with the UID or GID of owner of the file as opposed to the user executing it. This means that all executables with SUID bit set and are owned by root are executed with the UID of root. This situation is a security risk and should be minimized unless the program is designed for this risk. To find all files on your file system that have the SUID or SGID bit set, execute the command:</p>
<blockquote>
<pre><strong># find / -path /proc –prune –o –type f –perm +6000 –ls</strong></pre>
</blockquote>
<p>It is good practice to generate a list of SUID or SGID files on your server as soon as possible and re-run the above command on a regular basis to ensure new binaries with unsafe permissions are not being added to your server. World-writable files are a security risk as well. World-writable files and directories are dangerous since it allows anyone to modify them. World-writable directories allow anyone to add or delete files. To find all world-writable files and directories, execute the command:</p>
<blockquote>
<pre><strong><strike># find / -path /proc –prune –o –perm -2 ! –type 1 –ls</strike>
 </strong><strong># find / -path /proc –prune –o –perm -2 ! –type l –ls</strong></pre>
</blockquote>
<p>Another file permission issue is when files are not owned by any user or group. While this is not technically a security vulnerability, an audited system should not contain any unowned files. This is to prevent the situation where a new user is assigned a previous user’s UID so that the previous owner’s files, if any, are all owned by the new user. To find all files that are not owned by any user or group, execute the command:</p>
<blockquote>
<pre><strong><strike># find / -path /proc –prune –o –nouser –o –nogroup\</strike>
 </strong><strong># find / -path /proc –prune –o –nouser –o –nogroup</strong></pre>
</blockquote>
<p><strong><u>3.    Listening Ports</u></strong> &#8211; It is very important to ensure that all listening ports on your server are limited to only those that are necessary for you’re your server and its applications. To get a list of listening network ports, run the following command:</p>
<blockquote>
<pre><strong># netstat –tulp</strong></pre>
</blockquote>
<p>Disable any ports that are not necessary. To do so, kill the PID (process ID) shown by netstat. The only port that your server must be listening on is SSH (port 22/tcp). Other ports that will need to be listening depend upon the specific purpose of your dedicated server. Note that by killing the PID of the process you are not preventing your server from starting the same service again on bootup. In order to see what programs your server is launching on startup, execute the following command:</p>
<blockquote>
<pre><strike><strong># chkconfig –list |grep on</strong> (Red Hat systems)</strike>
 <strong># chkconfig –list | grep on</strong> (Red Hat systems)</pre>
<pre><strong># ls -l /etc/rc2.d/S* | cut -d/ -f6</strong> (Debian systems)</pre>
</blockquote>
<p>This command will show you which programs are to be executed in which run levels. In Red Hat, full multi-user mode is 3. To disable a service permanently, issue the following command:</p>
<blockquote><p><strong># chkconfig &lt;service_name&gt;</strong> off where <strong>&lt;service_name&gt;</strong> equals the name of your service, such as <strong>httpd</strong></p></blockquote>
<p>To disable any service in Debian, simply execute the following command:</p>
<blockquote>
<pre><strong># rm –f /etc/rc2.d/S*&lt;service_name&gt;</strong></pre>
</blockquote>
<p>Please note that the above commands do not actually disable the service, they simply prevent the service from being executed on startup.</p>
<p><strong><u>4.    Unlocked User Accounts</u></strong> &#8211; The first thing you should take stock of on a new server are the users with unlocked accounts. Users with unlocked accounts are allowed to login if assigned a valid shell, and should be kept to a minimum. To get a list of unlocked users, execute the following command:</p>
<blockquote>
<pre><strong><strike># egrep –v ‘.*:\*|:!' /etc/shadow|awk -F: '{print $1}'</strike>
 </strong><strong># egrep –v '.*:\* | :!' /etc/shadow | awk -F: '{print $1}'</strong></pre>
</blockquote>
<p>If you do not recognize any user returned by the above command, check to see if that user owns any files by executing the command:</p>
<blockquote>
<pre><strong># find / -path /proc -prune -o -user &lt;user_name&gt; -ls</strong> where <strong>&lt;username&gt;</strong> is the name of the user you do not recognize, such as <strong>jdoe</strong></pre>
</blockquote>
<p>If the user does not own any files, or files that will not hinder the stability of your server, delete the user by executing the command:</p>
<blockquote>
<pre><strong># userdel –r &lt;user_name&gt;</strong></pre>
</blockquote>
<p><strong><u>5.    Enable/Disable Features</u></strong> &#8211; All of the following lines and values should be added to the file /etc/sysctl.conf if you want to enable or disable the feature mentioned. You will need to restart your system for these changes to take effect:</p>
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td valign="top" width="200">TCP SYN Cookie Protection</td>
<td valign="top" width="200">net.ipv4.tcp_syncookies = 1</td>
</tr>
<tr>
<td valign="top" width="200">Disable IP Source Routing</td>
<td valign="top" width="200">net.ipv4.conf.all.accept_source_router = 0</td>
</tr>
<tr>
<td valign="top" width="200">Disable ICMP Redirect Acceptance</td>
<td valign="top" width="200">net.ipv4.conf.all.accept_redirects = 0</td>
</tr>
<tr>
<td valign="top" width="200">IP Spoofing Protection</td>
<td valign="top" width="200">net.ipv4.conf.all.rp_filter = 1</td>
</tr>
<tr>
<td valign="top" width="200">Ignoring Broadcasts Request</td>
<td valign="top" width="200">net.ipv4.icmp_echo_ignore_broadcasts=1</td>
</tr>
<tr>
<td valign="top" width="200">Bad Error Message Protection</td>
<td valign="top" width="200">net.ipv4.icmp_ignore_bogus_error_response = 1</td>
</tr>
</table>
<p><strong><u>6.    Basic Access Control</u></strong> &#8211; One of the most important things you can do to protect your server is to implement very basic access control. Access control can eliminate a majority of the risk involved in running out of date services on the Internet. In order to implement an effective access control policy on your dedicated server, you will need the following pieces of information: The IP address or addresses of your Internet connection. For some, this may be one static address, while for others it is a pool of addresses. If you have more than one Internet connection, please be sure to get ALL the IP addresses you could be assigned at any time. You may need to contact your Internet Service Provider for this information.</p>
<p><strong><u>7.    Restrict SSH Connections</u></strong> &#8211; While we do not recommend anybody running outdated software, especially something as crucial as SSH, a not insignificant portion of the risks involved in running an outdated SSH server can be mitigated by only allowing certain IP networks to access your SSH server via iptables. Execute the following command to only allow SSH connections from certain IP address:</p>
<blockquote>
<pre><strong># $IPTABLES –A INPUT –p tcp –dport 22 –s &lt;X.X.X.X/NN&gt; –j ACCEPT</strong></pre>
</blockquote>
<p>The above line will allow TCP packets destined for port 22 to be accepted if and only if the source of the packets are within the network denoted in <strong>&lt;X.X.X.X/NN&gt;</strong>. If you have more than one Internet connection, or have multiple networks, simply add another line, replacing <strong>&lt;X.X.X.X/NN&gt;</strong> with the proper values.</p>
<p><strong><u>8.    Access Control on Control Panel</u></strong> &#8211; If your server is running a control panel, you can also improve your security by implementing an access control policy on the control panel administrative port.</p>
<table border="0" cellpadding="2" cellspacing="0" width="400">
<tr>
<td valign="top" width="55">
<pre>Plesk:</pre>
</td>
<td valign="top" width="343">
<pre><strong>$IPTABLES –A INPUT –p tcp –dport 8443 –s X.X.X.X/NN –j ACCEPT</strong></pre>
</td>
</tr>
<tr>
<td valign="top" width="55">
<pre>Ensim:</pre>
</td>
<td valign="top" width="343">
<pre><strong>$IPTABLES –A INPUT –p tcp –dport 19638 –s X.X.X.X/NN –j ACCEPT</strong></pre>
</td>
</tr>
<tr>
<td valign="top" width="55">
<pre>Cpanel:</pre>
</td>
<td valign="top" width="343">
<pre><strong>$IPTABLES –A INPUT –p tcp –dport 2082 –s X.X.X.X/NN –j ACCEPT</strong></pre>
</td>
</tr>
</table>
<p><strong><u>9.    Access Control on FTP</u></strong> &#8211; Another service you may want to implement an access control policy on is FTP. If you or a small handful of people are the only allowed users to FTP into your dedicated server, then you will certainly benefit from employing some iptables rules by entering the commands:</p>
<blockquote>
<pre><strong>$IPTABLES –A INPUT –p tcp –s X.X.X.X/NN –dport 20 –syn –j ACCEPT
 $IPTABLES –A INPUT –p tcp –s X.X.X.X/NN –dport 21 –syn –j ACCEPT</strong></pre>
</blockquote>
<p>Note that both of the above lines must be executed for each source network.</p>
<p><strong><u>10.    Enable IPTABLES</u></strong> &#8211; Lastly, if you do not have a hardware firewall you will want to enable <strong>iptables</strong>, the software firewall in Linux systems. For a detailed iptables tutorial from ServePath, please visit our Support Center pages at: <a href="http://www.servepath.com/support/iptables.htm">http://www.servepath.com/support/iptables.htm</a>.</p>
<p>Hope that helps you get your Linux Server get even more secured! For other helpful tips like this, be sure to visit the ServePath <a href="http://www.servepath.com/support/knowledgebase_home.htm" title="Knowledge Base" target="_blank">Knowledge Base</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.servepath.com/2008/02/13/10-things-you-should-secure-on-your-linux-server/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>KB: Why is My FTP Transfer Speed Slower Than Expected?</title>
		<link>http://blog.servepath.com/2008/02/01/kb-why-is-my-ftp-transfer-speed-slower-than-expected/</link>
		<comments>http://blog.servepath.com/2008/02/01/kb-why-is-my-ftp-transfer-speed-slower-than-expected/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 20:46:18 +0000</pubDate>
		<dc:creator>Michael Sheehan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technical Documentation]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[iperf]]></category>
		<category><![CDATA[knowledge base]]></category>
		<category><![CDATA[ServePath]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[transfer]]></category>

		<guid isPermaLink="false">http://blog.servepath.com/2008/02/01/kb-why-is-my-ftp-transfer-speed-slower-than-expected/</guid>
		<description><![CDATA[<p>From the ServePath Knowledge Base:</p>
<blockquote><p>Some users may experience slow FTP performance despite having high-bandwidth connections at both ends. The following hypothetical example illustrates this common issue.</p>
<p>For example, an FTP stream to one of our servers located in Texas from a server located within our network in San Francisco would peak at around 6 to 7 Mbps. This happens even though both machines at either end are connected to the Internet using a 100 Mbps link.</p>
<p>We ran several tests using a freely available utility called iperf, and obtained interesting results. While a single TCP stream would peak at around 6 Mbps, a single UDP stream would consume almost the whole available bandwidth at more than 95 Mbps. However, even though a single TCP stream would peak at around 6 Mbps, we could send multiple TCP streams and use much of the available link capacity.</p>
<p>The question then is why does one TCP stream peak at only 6 Mbps? This actually has to do with how flow-control is handled in a particular TCP implementation. Flow-control in TCP is dependent on window-size and the round-trip time (RTT) or latency, and both attributes can significantly affect TCP performance. For example, with the same link capacity and window size of (35,040 Bytes), if the RTT is 1ms, a TCP stream can use 280 Mbps of bandwidth. Increase the RTT to 50ms, and the TCP performance drops to 5.6 Mbps. Also, even the slightest packet loss can severely affect TCP performance. Our RTT from SF to the server in TX is around 45ms. That would explain the slow FTP performance.</p>
<p>Despite having plenty of bandwidth, we cannot circumvent the latency issue. It will take a certain amount of time for a packet to travel from one geographic location to another. Transmission is ultimately limited by the speed of light, which is not an insignificant factor. Furthermore, the paths over the Internet are not necessarily streamlined according to geography.</p>
<p>So then how can we achieve throughput of greater than 6 Mbps for a TCP stream? There are several solutions:</p>
<p>- Tuning TCP window size<br />
- Using software that splits a single flow into multiple flows<br />
- Leveraging Caching and Content Delivery Networks</p>
<p>There are several freely available papers on the topic of TCP performance over the Internet. <a href="http://www.wave7optics.com/pdf/TCP_Performance_Broadband_Networks.pdf" target="_blank">This particular one</a> explains it very clearly. Another <a href="http://www.computerworld.com.my/PrinterFriendly.aspx?articleid=3175&amp;issueid=91&amp;pubid=1" target="_blank">useful link</a> with vendor solutions.</p></blockquote>
<p>Latest version of the KB article is <a href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000EFsX&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3D2445%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1" target="_blank">here</a>.</p>
<p>Below is a preview:</p>
<div class="pageview">
  <div class="pageviewhead">
    <img alt="View code" src="http://blog.servepath.com/wp-content/plugins/pageview/pageview.gif" width="48" height="48" align="left"/>

    <table>
      <tr>
        <td><strong>Title:</strong></td>
        <td><a title="View fullscreen" target="_blank" href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000EFsX&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3D2445%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1">KB: Why is My FTP Transfer Speed Slower Than Expected</a></td>
      </tr>
      <tr>
        <td valign="top"><strong>Description:</strong></td>
        <td>Some users may experience slow FTP performance despite having high-bandwidth connections at both ends.</td>
      </tr>
    </table>
  </div>

  <iframe src="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000EFsX&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3D2445%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1" frameborder="0">Get a better browser!</iframe>
</div>
<div style="display:block"><small><em><strong>Thank you for your interest in the ServePath blog. Please note that all of our most recent content is now on the <a href="http://blog.gogrid.com">GoGrid blog</a>. We recommend that you visit that site and subscribe to the <a href="http://blog.gogrid.com/feed">GoGrid blog feed</a>. This blog will no longer be updated so we encourage you to read up on GoGrid Cloud and Dedicated Infrastructure hosting on-demand at: <a href="http://www.gogrid.com">http://www.gogrid.com</a>.</strong></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>From the ServePath Knowledge Base:</p>
<blockquote><p>Some users may experience slow FTP performance despite having high-bandwidth connections at both ends. The following hypothetical example illustrates this common issue.</p>
<p>For example, an FTP stream to one of our servers located in Texas from a server located within our network in San Francisco would peak at around 6 to 7 Mbps. This happens even though both machines at either end are connected to the Internet using a 100 Mbps link.</p>
<p>We ran several tests using a freely available utility called iperf, and obtained interesting results. While a single TCP stream would peak at around 6 Mbps, a single UDP stream would consume almost the whole available bandwidth at more than 95 Mbps. However, even though a single TCP stream would peak at around 6 Mbps, we could send multiple TCP streams and use much of the available link capacity.</p>
<p>The question then is why does one TCP stream peak at only 6 Mbps? This actually has to do with how flow-control is handled in a particular TCP implementation. Flow-control in TCP is dependent on window-size and the round-trip time (RTT) or latency, and both attributes can significantly affect TCP performance. For example, with the same link capacity and window size of (35,040 Bytes), if the RTT is 1ms, a TCP stream can use 280 Mbps of bandwidth. Increase the RTT to 50ms, and the TCP performance drops to 5.6 Mbps. Also, even the slightest packet loss can severely affect TCP performance. Our RTT from SF to the server in TX is around 45ms. That would explain the slow FTP performance.</p>
<p>Despite having plenty of bandwidth, we cannot circumvent the latency issue. It will take a certain amount of time for a packet to travel from one geographic location to another. Transmission is ultimately limited by the speed of light, which is not an insignificant factor. Furthermore, the paths over the Internet are not necessarily streamlined according to geography.</p>
<p>So then how can we achieve throughput of greater than 6 Mbps for a TCP stream? There are several solutions:</p>
<p>- Tuning TCP window size<br />
- Using software that splits a single flow into multiple flows<br />
- Leveraging Caching and Content Delivery Networks</p>
<p>There are several freely available papers on the topic of TCP performance over the Internet. <a href="http://www.wave7optics.com/pdf/TCP_Performance_Broadband_Networks.pdf" target="_blank">This particular one</a> explains it very clearly. Another <a href="http://www.computerworld.com.my/PrinterFriendly.aspx?articleid=3175&amp;issueid=91&amp;pubid=1" target="_blank">useful link</a> with vendor solutions.</p></blockquote>
<p>Latest version of the KB article is <a href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000EFsX&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3D2445%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1" target="_blank">here</a>.</p>
<p>Below is a preview:</p>
<div class="pageview">
  <div class="pageviewhead">
    <img alt="View code" src="http://blog.servepath.com/wp-content/plugins/pageview/pageview.gif" width="48" height="48" align="left"/>

    <table>
      <tr>
        <td><strong>Title:</strong></td>
        <td><a title="View fullscreen" target="_blank" href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000EFsX&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3D2445%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1">KB: Why is My FTP Transfer Speed Slower Than Expected</a></td>
      </tr>
      <tr>
        <td valign="top"><strong>Description:</strong></td>
        <td>Some users may experience slow FTP performance despite having high-bandwidth connections at both ends.</td>
      </tr>
    </table>
  </div>

  <iframe src="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000EFsX&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3D2445%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1" frameborder="0">Get a better browser!</iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.servepath.com/2008/02/01/kb-why-is-my-ftp-transfer-speed-slower-than-expected/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KB: Rebooting a Linux Server After a Kernel Panic</title>
		<link>http://blog.servepath.com/2008/01/23/kb-rebooting-a-linux-server-after-a-kernel-panic/</link>
		<comments>http://blog.servepath.com/2008/01/23/kb-rebooting-a-linux-server-after-a-kernel-panic/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 17:15:05 +0000</pubDate>
		<dc:creator>Michael Sheehan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technical Documentation]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[kernel panic]]></category>
		<category><![CDATA[knowledge base]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[reboot]]></category>

		<guid isPermaLink="false">http://blog-int.servepath.com/2008/01/23/kb-rebooting-a-linux-server-after-a-kernel-panic/</guid>
		<description><![CDATA[<p>From the ServePath Knowledge Base:</p>
<blockquote><p>By default, a Linux server doesn&#8217;t reboot after a kernel panic but waits for a user to manually reboot the server. To check this behavior, check /proc/sys/kernel/panic.</p>
<p>This represents the amount of time (in seconds) the kernel will wait before rebooting if it reaches a &#8220;kernel panic.&#8221; A setting of zero (0) seconds will disable rebooting on kernel panic. If the value is set to 1, the server will display the error message that a kernel panic occurred and will do nothing.</p></blockquote>
<p>Latest version of KB article is <a href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000E741&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DRebooting%2Ba%2BLinux%2BServer%2BAfter%2Ba%2BKernel%2BPanic%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1">here</a>.</p>
<p>Below is a preview:<br />
<div class="pageview">
  <div class="pageviewhead">
    <img alt="View code" src="http://blog.servepath.com/wp-content/plugins/pageview/pageview.gif" width="48" height="48" align="left"/>

    <table>
      <tr>
        <td><strong>Title:</strong></td>
        <td><a title="View fullscreen" target="_blank" href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000E741&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DRebooting%2Ba%2BLinux%2BServer%2BAfter%2Ba%2BKernel%2BPanic%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1">KB: Rebooting a Linux Server After a Kernel Panic</a></td>
      </tr>
      <tr>
        <td valign="top"><strong>Description:</strong></td>
        <td>By default, a Linux server doesnt reboot after a kernel panic</td>
      </tr>
    </table>
  </div>

  <iframe src="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000E741&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DRebooting%2Ba%2BLinux%2BServer%2BAfter%2Ba%2BKernel%2BPanic%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1" frameborder="0">Get a better browser!</iframe>
</div>
<div style="display:block"><small><em><strong>Thank you for your interest in the ServePath blog. Please note that all of our most recent content is now on the <a href="http://blog.gogrid.com">GoGrid blog</a>. We recommend that you visit that site and subscribe to the <a href="http://blog.gogrid.com/feed">GoGrid blog feed</a>. This blog will no longer be updated so we encourage you to read up on GoGrid Cloud and Dedicated Infrastructure hosting on-demand at: <a href="http://www.gogrid.com">http://www.gogrid.com</a>.</strong></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>From the ServePath Knowledge Base:</p>
<blockquote><p>By default, a Linux server doesn&#8217;t reboot after a kernel panic but waits for a user to manually reboot the server. To check this behavior, check /proc/sys/kernel/panic.</p>
<p>This represents the amount of time (in seconds) the kernel will wait before rebooting if it reaches a &#8220;kernel panic.&#8221; A setting of zero (0) seconds will disable rebooting on kernel panic. If the value is set to 1, the server will display the error message that a kernel panic occurred and will do nothing.</p></blockquote>
<p>Latest version of KB article is <a href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000E741&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DRebooting%2Ba%2BLinux%2BServer%2BAfter%2Ba%2BKernel%2BPanic%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1">here</a>.</p>
<p>Below is a preview:<br />
<div class="pageview">
  <div class="pageviewhead">
    <img alt="View code" src="http://blog.servepath.com/wp-content/plugins/pageview/pageview.gif" width="48" height="48" align="left"/>

    <table>
      <tr>
        <td><strong>Title:</strong></td>
        <td><a title="View fullscreen" target="_blank" href="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000E741&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DRebooting%2Ba%2BLinux%2BServer%2BAfter%2Ba%2BKernel%2BPanic%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1">KB: Rebooting a Linux Server After a Kernel Panic</a></td>
      </tr>
      <tr>
        <td valign="top"><strong>Description:</strong></td>
        <td>By default, a Linux server doesnt reboot after a kernel panic</td>
      </tr>
    </table>
  </div>

  <iframe src="http://ssl.salesforce.com/_ui/selfservice/pkb/PublicKnowledgeSolution/d?orgId=00D00000000hhhW&amp;id=50100000000E741&amp;retURL=%2Fsol%2Fpublic%2Fsolutionbrowser.jsp%3Fsearch%3DRebooting%2Ba%2BLinux%2BServer%2BAfter%2Ba%2BKernel%2BPanic%26cid%3D02n00000000Ccmq%26orgId%3D00D00000000hhhW%26t%3D4&amp;ps=1" frameborder="0">Get a better browser!</iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.servepath.com/2008/01/23/kb-rebooting-a-linux-server-after-a-kernel-panic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup, restore, and disaster management &#8211; part II</title>
		<link>http://blog.servepath.com/2006/04/18/backup-restore-and-disaster-management-part-ii/</link>
		<comments>http://blog.servepath.com/2006/04/18/backup-restore-and-disaster-management-part-ii/#comments</comments>
		<pubDate>Tue, 18 Apr 2006 14:55:42 +0000</pubDate>
		<dc:creator>Toby</dc:creator>
				<category><![CDATA[Data Center]]></category>
		<category><![CDATA[Managed Services]]></category>
		<category><![CDATA[Technical Documentation]]></category>

		<guid isPermaLink="false">http://blog-int.servepath.com/?p=74</guid>
		<description><![CDATA[<p>When we last left our hero (me) he was telling us how to avoid cardiovascular illness. Really. Heart disease is the number one effect of data loss in IT. Or it feels like it, anyway. Probably the number one effect of data loss is simply failure. If you&#8217;re a small business, and you lose all your data, there&#8217;s a 70% chance that, this time next year, you won&#8217;t be a small business anymore.</p>
<p>Of the four points we&#8217;ve listed below, we&#8217;ve covered the what and the where; we still need to examine when and how to back up.</p>
<p><strong>How to back up?</strong></p>
<p>As I said below, ideally everything that needs to be backed up is in one spot. Ideally this spot is the backup media, which is in a government-controlled facility at the bottom of a mine under a mountain with four or five OC-768s. The real world is never ideal, unfortunately, so some of this just isn&#8217;t possible. However, you can get closer or further from ideal depending on how you set things up.</p>
<p>Try to keep whatever needs to be backed up on a separate partition; on a separate drive if you can manage it. This allows you to use tools such as <a href="http://www.freebsd.org/cgi/man.cgi?query=dump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;format=html" target="_blank">dump</a> (nww), which is pretty much the best tool for the job (on FreeBSD anyway). You can even keep configuration files in this space. The fewer places you have to hunt for files, the better.</p>
<p>If you use backups as a kind of undelete function (say, if you are backing up personal files and sometimes need to restore a file you&#8217;ve deleted), then you should keep incremental backups. Incremental backups store everything that has changed since the last backup. These allow you to make frequent, short, small backups. If your work changes often (for example if you are backing up an office fileserver) you can run such backups several times during the business day. Then, when a file is needed, you can grab it from an older incremental backup.</p>
<p>Alternatively you can make full backups each time. This minimizes restore time, since with only one backup file you can restore all your data.</p>
<p>More complicated structures, such as the Tower of Hanoi differential algorithm that is suggested in dump&#8217;s manpage, are nifty but not strictly necessary. They achieve an optimum between space consumed, time to back up, and time to restore.</p>
<p>A further consideration needs to be given to databases. You can&#8217;t simply dump the actual database files; when you restore, you&#8217;ll find the database is corrupted. Instead, regularly dump the database (a real database can dump without locking whole tables) and then back up the dumpfiles.</p>
<p><strong>When to back up?</strong></p>
<p>At what time to back up isn&#8217;t really hard to determine: whenever the load is lightest.</p>
<p>You might want to put some thought, however, into deciding how often to back up. As I said below, not everything need be backed up at once, but only as often as it changes significantly.</p>
<p>If you are making incremental archives or backups, you can run the backup three or four times daily, and then push those archives offsite at night.</p>
<p><strong>Further reading</strong></p>
<p>(all links open in a new window&#8211;sorry)</p>
<ul>
<li><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-strategies.html" target="_blank">Backup strategies</a></li>
<li><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html" target="_blank">Backup basics</a></li>
</ul>
<p>Most of this has been directed at Unix-like operating systems. Some of this applies to Windows as well, though in Windows you can&#8217;t simply back up your configuration scripts and then restore them to have your applications work just as you remembered them. If you enjoy paying for software, there are many third party backup utilities availables, such as Veritas Backup Exec. But most of these guidelines should apply.</p>
<div style="display:block"><small><em><strong>Thank you for your interest in the ServePath blog. Please note that all of our most recent content is now on the <a href="http://blog.gogrid.com">GoGrid blog</a>. We recommend that you visit that site and subscribe to the <a href="http://blog.gogrid.com/feed">GoGrid blog feed</a>. This blog will no longer be updated so we encourage you to read up on GoGrid Cloud and Dedicated Infrastructure hosting on-demand at: <a href="http://www.gogrid.com">http://www.gogrid.com</a>.</strong></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>When we last left our hero (me) he was telling us how to avoid cardiovascular illness. Really. Heart disease is the number one effect of data loss in IT. Or it feels like it, anyway. Probably the number one effect of data loss is simply failure. If you&#8217;re a small business, and you lose all your data, there&#8217;s a 70% chance that, this time next year, you won&#8217;t be a small business anymore.</p>
<p>Of the four points we&#8217;ve listed below, we&#8217;ve covered the what and the where; we still need to examine when and how to back up.</p>
<p><strong>How to back up?</strong></p>
<p>As I said below, ideally everything that needs to be backed up is in one spot. Ideally this spot is the backup media, which is in a government-controlled facility at the bottom of a mine under a mountain with four or five OC-768s. The real world is never ideal, unfortunately, so some of this just isn&#8217;t possible. However, you can get closer or further from ideal depending on how you set things up.</p>
<p>Try to keep whatever needs to be backed up on a separate partition; on a separate drive if you can manage it. This allows you to use tools such as <a href="http://www.freebsd.org/cgi/man.cgi?query=dump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;format=html" target="_blank">dump</a> (nww), which is pretty much the best tool for the job (on FreeBSD anyway). You can even keep configuration files in this space. The fewer places you have to hunt for files, the better.</p>
<p>If you use backups as a kind of undelete function (say, if you are backing up personal files and sometimes need to restore a file you&#8217;ve deleted), then you should keep incremental backups. Incremental backups store everything that has changed since the last backup. These allow you to make frequent, short, small backups. If your work changes often (for example if you are backing up an office fileserver) you can run such backups several times during the business day. Then, when a file is needed, you can grab it from an older incremental backup.</p>
<p>Alternatively you can make full backups each time. This minimizes restore time, since with only one backup file you can restore all your data.</p>
<p>More complicated structures, such as the Tower of Hanoi differential algorithm that is suggested in dump&#8217;s manpage, are nifty but not strictly necessary. They achieve an optimum between space consumed, time to back up, and time to restore.</p>
<p>A further consideration needs to be given to databases. You can&#8217;t simply dump the actual database files; when you restore, you&#8217;ll find the database is corrupted. Instead, regularly dump the database (a real database can dump without locking whole tables) and then back up the dumpfiles.</p>
<p><strong>When to back up?</strong></p>
<p>At what time to back up isn&#8217;t really hard to determine: whenever the load is lightest.</p>
<p>You might want to put some thought, however, into deciding how often to back up. As I said below, not everything need be backed up at once, but only as often as it changes significantly.</p>
<p>If you are making incremental archives or backups, you can run the backup three or four times daily, and then push those archives offsite at night.</p>
<p><strong>Further reading</strong></p>
<p>(all links open in a new window&#8211;sorry)</p>
<ul>
<li><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-strategies.html" target="_blank">Backup strategies</a></li>
<li><a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html" target="_blank">Backup basics</a></li>
</ul>
<p>Most of this has been directed at Unix-like operating systems. Some of this applies to Windows as well, though in Windows you can&#8217;t simply back up your configuration scripts and then restore them to have your applications work just as you remembered them. If you enjoy paying for software, there are many third party backup utilities availables, such as Veritas Backup Exec. But most of these guidelines should apply.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.servepath.com/2006/04/18/backup-restore-and-disaster-management-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup, restore, and disaster management &#8211; part I</title>
		<link>http://blog.servepath.com/2006/04/03/backup-restore-and-disaster-management-part-i/</link>
		<comments>http://blog.servepath.com/2006/04/03/backup-restore-and-disaster-management-part-i/#comments</comments>
		<pubDate>Mon, 03 Apr 2006 11:56:55 +0000</pubDate>
		<dc:creator>Toby</dc:creator>
				<category><![CDATA[Data Center]]></category>
		<category><![CDATA[Managed Services]]></category>
		<category><![CDATA[Technical Documentation]]></category>

		<guid isPermaLink="false">http://blog.servepath.com/2006/04/03/backup-restore-and-disaster-management-part-i/</guid>
		<description><![CDATA[<p>I like to listen to music when I&#8217;m here alone.  Right now I&#8217;m listening to a song that goes <a href="http://homepages.luc.edu/~avande1/requiem.htm" target="_blank"><em>&#8220;Dies illa, dies irae, calamitatis et miseriae, dies magna et amara valde.&#8221;</em></a> (new window warning)  Roughly translated it means, &#8220;That day, when the server died, and fsck couldn&#8217;t recover the data, but unlinked all my files, that day all my data died, and I didn&#8217;t know where my backups were.&#8221;</p>
<p>If you have a dedicated server, it&#8217;s almost a certainty that you&#8217;ve never seen your server, or have even been in the same city as your server.  Thus it is almost a certainty that you can&#8217;t show up in person to change tapes and take them offsite.  Yet, it&#8217;s also probably a pretty good bet that your data is so critical to you or your business that it would not be too much of an exaggeration to say losing it would be a calamity.</p>
<p>How can you ensure your data is safe?</p>
<p>Well first, like security, your backup strategy needs its own plan and its own budget.  You can&#8217;t toss firewalls at your server to make it secure; neither can you copy files off into the void.  There are a number of issues that need to be addressed: <em>what</em> to back up, <em>where</em> to store the data, <em>how</em> to back it up, and <em>when</em> to run backups.</p>
<p>Some of this might apply if you&#8217;ve got a colocation account somewhere, but a lot of it is completely different.  Physical access to a machine can change circumstances (as well as what services an ISP provides &#8212; at ServePath we are far more hands-on with our (unmanaged) dedicated customers than we are with our colocation customers).</p>
<p><strong>What to back up?</strong></p>
<p>If you&#8217;re paranoid, you might say &#8220;everything&#8221;, but this really doesn&#8217;t make any kind of sense if you&#8217;ve got a dedicated server.  Since you can&#8217;t get to the machine, you&#8217;re never going to interact with it unless it has a complete install of some operating system on it.  This means that file system-level utilities (such as my all-time favorite, <a href="http://www.freebsd.org/cgi/man.cgi?query=dump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;format=html" target="_blank">dump</a> (nww)) are pretty useless <em>unless</em> you architect your server&#8217;s layout around them.</p>
<p>When deciding what to back up, you have to keep in mind how you&#8217;re going to restore.  If you simply tar up /, when you restore you&#8217;re going to scribble all over system files (and tar has issues with certain kinds of files as well) with old versions.  If you were backing up Debian but restoring to FC4, you could easily render your system unusable by restoring to it!</p>
<p>What you want to grab are all your data files, and leave the rest to hang.  Data files are actually split into two groups, configuration files and actual data files.  Config files live in places like /etc and /var/named.  If you can, try to avoid putting them there; use /root or something under /usr/local, such as /usr/local/etc or /usr/local/var.  This way you don&#8217;t find out, when restoring from a crash, that your 2500 line custom Sendmail script was under /etc, which you didn&#8217;t bother to back up.  Data files can live in some funny places, but if there&#8217;s a service (such as httpd) that owns them, it&#8217;s best to give them a user (such as http or www) and put all the relevant files under this user&#8217;s home directory.  This doesn&#8217;t have to be /usr/home/www.  This helps to keep track of where everything <em>is</em>.</p>
<p>If money (and therefore space) is an issue, you can decide what can be risked.  I don&#8217;t back up any of my media files, since the chance of losing them is very low, the cost of losing them is low, and the cost of backing them up is high.  If you have a bunch of open source repositories on your site because you like to help out SourceForge or Fresh Meat, then don&#8217;t bother to back them up, because you can just download them again.  If you have a bunch of open source repositories on your site because your business involves them, as one of <a href="http://krugle.com/" target="_blank">our customers&#8217;</a> (nww) does, then you should be backing them up because the time it takes to download them is more expensive than the cost of backing them up.</p>
<p><strong>Where to store the data?</strong></p>
<p>Dedicated customers are in kind of a tricky position here.  The answer to this question is almost an unequivocal &#8220;offsite&#8221;, but if you have enough data even a 100Mbps pipe can&#8217;t finish the first backup before the second begins.</p>
<p>Fortunately, you don&#8217;t need to pull your backups offsite <em>every day</em>.  You can automatically perform remote backups weekly or even monthly, depending on your data, its temporal value, and the rate at which it updates or changes.  For example, a group of servers that powers a small online store can backup the transaction database nightly, but the contents of the store itself probably don&#8217;t update nearly as often, and the actual scripts that run the store are even less critical.  All need to be backed up, since without any one of them the site is offline, but they have different priorities.</p>
<p>The whole reason for pulling backups offline is so that if there is a major disaster, recovery is still possible.  ServePath itself is fairly secure (impressively so, I&#8217;ll blog about it sometime), so a disaster big enough to destroy your onsite backups <em>and</em> your server would probably level this building and most of the rest of San Francisco.  Still, <em>if</em> it happens, you still want your business to be able to pick itself up.  So take the backups offsite at least once in a while.</p>
<p>Where to keep the data while it&#8217;s here?  I want to take this time to clear up a misconception about RAID.  RAID is not backups.  They do not protect against the same kinds of errors.  Backups provide crude protection against mistakenly deleted files, hackers, corrupt file systems, and hardware failures.  RAID provides graceful protection against hardware failure, <em>sometimes</em>.  Sometimes RAID simply improves performance.  You can&#8217;t assume that RAID 1 (mirrored drives) will save your data, because if there is some <em>other</em> hardware failure, like the power supply, and your file systems are corrupted, then <em>both</em> drives are gonners.  What RAID <em>does</em> let you do is to notice that a drive has failed, and then schedule downtime to replace that drive.  It turns uncontrolled downtime into controlled downtime.  Usually.</p>
<p>ServePath really offers three choices for onsite backups: a second drive in the same server, a second server which mirrors the first, or space on a NAS drive.  I&#8217;m not sure what the standard offerings among dedicated server hosts are but I&#8217;m sure they&#8217;re much the same.</p>
<p>A second drive is a pretty good idea if you&#8217;re most often recovering from deleted files.  Transfers are quick, both for backup and restore.  However, if the server is offline and you need access to the data, you&#8217;re out of luck.  And since really anything that affects the first drive can affect the second drive, too, it is not entirely safe.  Very recently I had to help a customer restore his OS after a script ran &#8220;rm -r /usr&#8221;.  Fortunately, he had other backups.</p>
<p>Something like a NAS prevents most of the troubles that a second drive can run into.  Since data can be copied via rsync or ftp, it allows archives to be made without exposing them to the file system for errant scripts to destroy.  Since it is on a LAN link with the server, backup and restore is relatively quick.  This can be thought of as &#8220;semi offsite,&#8221; since even if your server explodes, your data will probably still be okay (depending of course on the energy in the explosion and where your computer is in the data center).</p>
<p>A second server is the most expensive but also the most reliable solution.  With proper load balancing configured, any single server could die and your customers wouldn&#8217;t even <em>notice</em>, because the other servers would pick up the load.  As long as all servers in the pool have all the data, no single failure should affect the rest.</p>
<p>Okay this is getting long.  I&#8217;ll return to it next week.</p>
<div style="display:block"><small><em><strong>Thank you for your interest in the ServePath blog. Please note that all of our most recent content is now on the <a href="http://blog.gogrid.com">GoGrid blog</a>. We recommend that you visit that site and subscribe to the <a href="http://blog.gogrid.com/feed">GoGrid blog feed</a>. This blog will no longer be updated so we encourage you to read up on GoGrid Cloud and Dedicated Infrastructure hosting on-demand at: <a href="http://www.gogrid.com">http://www.gogrid.com</a>.</strong></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>I like to listen to music when I&#8217;m here alone.  Right now I&#8217;m listening to a song that goes <a href="http://homepages.luc.edu/~avande1/requiem.htm" target="_blank"><em>&#8220;Dies illa, dies irae, calamitatis et miseriae, dies magna et amara valde.&#8221;</em></a> (new window warning)  Roughly translated it means, &#8220;That day, when the server died, and fsck couldn&#8217;t recover the data, but unlinked all my files, that day all my data died, and I didn&#8217;t know where my backups were.&#8221;</p>
<p>If you have a dedicated server, it&#8217;s almost a certainty that you&#8217;ve never seen your server, or have even been in the same city as your server.  Thus it is almost a certainty that you can&#8217;t show up in person to change tapes and take them offsite.  Yet, it&#8217;s also probably a pretty good bet that your data is so critical to you or your business that it would not be too much of an exaggeration to say losing it would be a calamity.</p>
<p>How can you ensure your data is safe?</p>
<p>Well first, like security, your backup strategy needs its own plan and its own budget.  You can&#8217;t toss firewalls at your server to make it secure; neither can you copy files off into the void.  There are a number of issues that need to be addressed: <em>what</em> to back up, <em>where</em> to store the data, <em>how</em> to back it up, and <em>when</em> to run backups.</p>
<p>Some of this might apply if you&#8217;ve got a colocation account somewhere, but a lot of it is completely different.  Physical access to a machine can change circumstances (as well as what services an ISP provides &#8212; at ServePath we are far more hands-on with our (unmanaged) dedicated customers than we are with our colocation customers).</p>
<p><strong>What to back up?</strong></p>
<p>If you&#8217;re paranoid, you might say &#8220;everything&#8221;, but this really doesn&#8217;t make any kind of sense if you&#8217;ve got a dedicated server.  Since you can&#8217;t get to the machine, you&#8217;re never going to interact with it unless it has a complete install of some operating system on it.  This means that file system-level utilities (such as my all-time favorite, <a href="http://www.freebsd.org/cgi/man.cgi?query=dump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+6.0-RELEASE+and+Ports&amp;format=html" target="_blank">dump</a> (nww)) are pretty useless <em>unless</em> you architect your server&#8217;s layout around them.</p>
<p>When deciding what to back up, you have to keep in mind how you&#8217;re going to restore.  If you simply tar up /, when you restore you&#8217;re going to scribble all over system files (and tar has issues with certain kinds of files as well) with old versions.  If you were backing up Debian but restoring to FC4, you could easily render your system unusable by restoring to it!</p>
<p>What you want to grab are all your data files, and leave the rest to hang.  Data files are actually split into two groups, configuration files and actual data files.  Config files live in places like /etc and /var/named.  If you can, try to avoid putting them there; use /root or something under /usr/local, such as /usr/local/etc or /usr/local/var.  This way you don&#8217;t find out, when restoring from a crash, that your 2500 line custom Sendmail script was under /etc, which you didn&#8217;t bother to back up.  Data files can live in some funny places, but if there&#8217;s a service (such as httpd) that owns them, it&#8217;s best to give them a user (such as http or www) and put all the relevant files under this user&#8217;s home directory.  This doesn&#8217;t have to be /usr/home/www.  This helps to keep track of where everything <em>is</em>.</p>
<p>If money (and therefore space) is an issue, you can decide what can be risked.  I don&#8217;t back up any of my media files, since the chance of losing them is very low, the cost of losing them is low, and the cost of backing them up is high.  If you have a bunch of open source repositories on your site because you like to help out SourceForge or Fresh Meat, then don&#8217;t bother to back them up, because you can just download them again.  If you have a bunch of open source repositories on your site because your business involves them, as one of <a href="http://krugle.com/" target="_blank">our customers&#8217;</a> (nww) does, then you should be backing them up because the time it takes to download them is more expensive than the cost of backing them up.</p>
<p><strong>Where to store the data?</strong></p>
<p>Dedicated customers are in kind of a tricky position here.  The answer to this question is almost an unequivocal &#8220;offsite&#8221;, but if you have enough data even a 100Mbps pipe can&#8217;t finish the first backup before the second begins.</p>
<p>Fortunately, you don&#8217;t need to pull your backups offsite <em>every day</em>.  You can automatically perform remote backups weekly or even monthly, depending on your data, its temporal value, and the rate at which it updates or changes.  For example, a group of servers that powers a small online store can backup the transaction database nightly, but the contents of the store itself probably don&#8217;t update nearly as often, and the actual scripts that run the store are even less critical.  All need to be backed up, since without any one of them the site is offline, but they have different priorities.</p>
<p>The whole reason for pulling backups offline is so that if there is a major disaster, recovery is still possible.  ServePath itself is fairly secure (impressively so, I&#8217;ll blog about it sometime), so a disaster big enough to destroy your onsite backups <em>and</em> your server would probably level this building and most of the rest of San Francisco.  Still, <em>if</em> it happens, you still want your business to be able to pick itself up.  So take the backups offsite at least once in a while.</p>
<p>Where to keep the data while it&#8217;s here?  I want to take this time to clear up a misconception about RAID.  RAID is not backups.  They do not protect against the same kinds of errors.  Backups provide crude protection against mistakenly deleted files, hackers, corrupt file systems, and hardware failures.  RAID provides graceful protection against hardware failure, <em>sometimes</em>.  Sometimes RAID simply improves performance.  You can&#8217;t assume that RAID 1 (mirrored drives) will save your data, because if there is some <em>other</em> hardware failure, like the power supply, and your file systems are corrupted, then <em>both</em> drives are gonners.  What RAID <em>does</em> let you do is to notice that a drive has failed, and then schedule downtime to replace that drive.  It turns uncontrolled downtime into controlled downtime.  Usually.</p>
<p>ServePath really offers three choices for onsite backups: a second drive in the same server, a second server which mirrors the first, or space on a NAS drive.  I&#8217;m not sure what the standard offerings among dedicated server hosts are but I&#8217;m sure they&#8217;re much the same.</p>
<p>A second drive is a pretty good idea if you&#8217;re most often recovering from deleted files.  Transfers are quick, both for backup and restore.  However, if the server is offline and you need access to the data, you&#8217;re out of luck.  And since really anything that affects the first drive can affect the second drive, too, it is not entirely safe.  Very recently I had to help a customer restore his OS after a script ran &#8220;rm -r /usr&#8221;.  Fortunately, he had other backups.</p>
<p>Something like a NAS prevents most of the troubles that a second drive can run into.  Since data can be copied via rsync or ftp, it allows archives to be made without exposing them to the file system for errant scripts to destroy.  Since it is on a LAN link with the server, backup and restore is relatively quick.  This can be thought of as &#8220;semi offsite,&#8221; since even if your server explodes, your data will probably still be okay (depending of course on the energy in the explosion and where your computer is in the data center).</p>
<p>A second server is the most expensive but also the most reliable solution.  With proper load balancing configured, any single server could die and your customers wouldn&#8217;t even <em>notice</em>, because the other servers would pick up the load.  As long as all servers in the pool have all the data, no single failure should affect the rest.</p>
<p>Okay this is getting long.  I&#8217;ll return to it next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.servepath.com/2006/04/03/backup-restore-and-disaster-management-part-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New &#8220;Security Checklists&#8221; Published</title>
		<link>http://blog.servepath.com/2005/08/24/new-security-checklists-published/</link>
		<comments>http://blog.servepath.com/2005/08/24/new-security-checklists-published/#comments</comments>
		<pubDate>Wed, 24 Aug 2005 23:09:39 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Technical Documentation]]></category>

		<guid isPermaLink="false">http://blog-int.servepath.com/?p=15</guid>
		<description><![CDATA[<p>ColoServe&#8217;s parent company ServePath has just published some new &#8220;Security Checklists&#8221; for <a href="http://www.servepath.com/support/redhat_securitychecklist.htm" target="_blank">Red Hat</a>, <a href="http://www.servepath.com/support/debian_securitychecklist.htm" target="_blank">Debian</a>, <a href="http://www.servepath.com/support/freebsd_securitychecklist.htm" target="_blank">FreeBSD</a>, <a href="http://www.servepath.com/support/win2003_securitychecklist.htm" target="_blank">Windows 2003 </a>and <a href="http://www.servepath.com/support/win2000_securitychecklist.htm" target="_blank">Windows 2000 </a>which lots of people are finding helpful reference guides for keeping security vulnerabilities closed. These were written by one of our Senior Systems Engineers, who has drawn on his experience to put together these quick reference pages. With over 3000 servers under management in our San Francisco data center, he has seen it all, and shares some of the basics at the links above. Keep safe out there in the wilds of the Internet!</p>
<div style="display:block"><small><em><strong>Thank you for your interest in the ServePath blog. Please note that all of our most recent content is now on the <a href="http://blog.gogrid.com">GoGrid blog</a>. We recommend that you visit that site and subscribe to the <a href="http://blog.gogrid.com/feed">GoGrid blog feed</a>. This blog will no longer be updated so we encourage you to read up on GoGrid Cloud and Dedicated Infrastructure hosting on-demand at: <a href="http://www.gogrid.com">http://www.gogrid.com</a>.</strong></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>ColoServe&#8217;s parent company ServePath has just published some new &#8220;Security Checklists&#8221; for <a href="http://www.servepath.com/support/redhat_securitychecklist.htm" target="_blank">Red Hat</a>, <a href="http://www.servepath.com/support/debian_securitychecklist.htm" target="_blank">Debian</a>, <a href="http://www.servepath.com/support/freebsd_securitychecklist.htm" target="_blank">FreeBSD</a>, <a href="http://www.servepath.com/support/win2003_securitychecklist.htm" target="_blank">Windows 2003 </a>and <a href="http://www.servepath.com/support/win2000_securitychecklist.htm" target="_blank">Windows 2000 </a>which lots of people are finding helpful reference guides for keeping security vulnerabilities closed. These were written by one of our Senior Systems Engineers, who has drawn on his experience to put together these quick reference pages. With over 3000 servers under management in our San Francisco data center, he has seen it all, and shares some of the basics at the links above. Keep safe out there in the wilds of the Internet!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.servepath.com/2005/08/24/new-security-checklists-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
