<?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>fabiolagana.net &#187; hosts</title>
	<atom:link href="http://blog.fabiolagana.net/tag/hosts/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fabiolagana.net</link>
	<description>640 Kb should be enough memory for anybody</description>
	<lastBuildDate>Mon, 26 Oct 2009 13:17:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Eseguire il backup delle directory di un server</title>
		<link>http://blog.fabiolagana.net/eseguire-backup-directory-server/</link>
		<comments>http://blog.fabiolagana.net/eseguire-backup-directory-server/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 08:01:22 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[ip]]></category>

		<guid isPermaLink="false">http://blog.fabiolagana.net/?p=129</guid>
		<description><![CDATA[nome script: /usr/local/sbin/backup_dir.sh

descrizione: Con questo script viene fatto il backup delle directory importanti server

Inserendo una riga simile nel cron scheduliamo il backup tutte le notti]]></description>
			<content:encoded><![CDATA[<div style="padding:5px 0 5px 0; text-align:right; float:right;"><script type="text/javascript"><!--
google_ad_client = "pub-3446917171019162";
/* link_26082009_01_post */
google_ad_slot = "4038103458";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />&nbsp;<font size="1">Powered by <a style="color:#0000ff;font-family:Arial,Helvetica,sans-serif" href="http://www.maxblogpress.com/go.php?offer=niceart&pid=12" target="_blank" onmouseover="self.status='MaxBlogPress.com';return true;" onmouseout="self.status=''" onclick="pageTracker._trackPageview('/outgoing/www.maxblogpress.com/go.php?offer=niceart_pid=12&amp;referer=');">Max Banner Ads</a></font>&nbsp;</div><p>nome script: /usr/local/sbin/backup_dir.sh</p>
<p>descrizione: Con questo script viene fatto il backup delle directory importanti  server</p>
<p>Inserendo una riga simile nel cron scheduliamo il backup tutte le notti</p>
<pre id="area">cat /etc/cron.d/backup
MAILTO="postmaster@yourdomain.com"
00 21 * * * root test -x /usr/local/sbin/backup_dir.sh &#038;&#038; /usr/local/sbin/backup_dir.sh</pre>

<div class="wp_codebox"><table><tr id="p1291"><td class="code" id="p129code1"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># backup_dir.sh</span>
<span style="color: #666666; font-style: italic;"># Con questo script viene fatto il backup delle directory importanti  server</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">hosts_internal</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> your_host <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> host <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${hosts_internal[@]}</span>
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Download of /etc/ /usr/local/sbin/ /root/ /home/ directory from &quot;</span><span style="color: #007800;">$host</span><span style="color: #ff0000;">&quot; &quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Starting ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #666666; font-style: italic;"># bakup file for hosts</span>
  <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zcvf</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>root<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span> ;
  <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz <span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span><span style="color: #000000; font-weight: bold;">/</span>;
  <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>backup_files_<span style="color: #ff0000;">&quot;<span style="color: #007800;">$host</span>&quot;</span>_<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #ff0000;">&quot;%d%m%Y&quot;</span><span style="color: #000000; font-weight: bold;">`</span>.tar.gz
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Stopping ------&gt;&quot;</span>
  <span style="color: #c20cb9; font-weight: bold;">date</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/eseguire-backup-directory-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ping a list of many hosts</title>
		<link>http://blog.fabiolagana.net/ping-a-list-of-many-hosts/</link>
		<comments>http://blog.fabiolagana.net/ping-a-list-of-many-hosts/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 15:28:52 +0000</pubDate>
		<dc:creator>Fabio Laganà</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[Ping]]></category>

		<guid isPermaLink="false">http://blog.fabio.lagana.name/?p=23</guid>
		<description><![CDATA[cat config &#124;grep title &#124;awk -F- &#8216;{print $4}&#8217;&#124;grep -o &#8216;[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9]*&#8217; &#124;xargs -n 1 -P 254 ping -c1 -w1
]]></description>
			<content:encoded><![CDATA[<p>cat config |grep title |awk -F- &#8216;{print $4}&#8217;|grep -o &#8216;[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9]*&#8217; |xargs -n 1 -P 254 ping -c1 -w1</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fabiolagana.net/ping-a-list-of-many-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->