<?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>bareos &#8211; SMsoft &#8211; informatica e dintorni</title>
	<atom:link href="https://blog.smsoft.it/tag/bareos/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.smsoft.it</link>
	<description>consigli settimanali su MacOS, GNU/Linux ed Open Source</description>
	<lastBuildDate>Tue, 23 Jan 2018 08:30:12 +0000</lastBuildDate>
	<language>it-IT</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=86400</generator>
	<item>
		<title>Installare bareos e bareoswebui 17 su Debian 9 Stretch</title>
		<link>https://blog.smsoft.it/2018/01/23/installare-bareos-bareoswebui-17-debian-9-stretch/</link>
					<comments>https://blog.smsoft.it/2018/01/23/installare-bareos-bareoswebui-17-debian-9-stretch/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 23 Jan 2018 08:30:12 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Sicurezza]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[bareos]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">https://blog.smsoft.it/?p=3913</guid>

					<description><![CDATA[Bareos è un ottimo sistema di backup client-server che offre client per diverse piattaforme (Linux, MacOs, Windows) ed anche una comoda interfaccia web, oltre che un client CLI, per poter gestire il tutto. Per usi medio/alti è possibile gestire anche TAPE device, ma per piccole realtà, si può usare anche un disco (magari un NAS ... <a title="Installare bareos e bareoswebui 17 su Debian 9 Stretch" class="read-more" href="https://blog.smsoft.it/2018/01/23/installare-bareos-bareoswebui-17-debian-9-stretch/" aria-label="Per saperne di più su Installare bareos e bareoswebui 17 su Debian 9 Stretch">Leggi tutto</a>]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.bareos.org" rel="noopener noreferrer" target="_blank">Bareos</a> è un ottimo sistema di backup client-server che offre client per diverse piattaforme (Linux, MacOs, Windows) ed anche una comoda interfaccia web, oltre che un client CLI, per poter gestire il tutto.<br />
Per usi medio/alti è possibile gestire anche TAPE device, ma per piccole realtà, si può usare anche un disco (magari un NAS decente con RAID).</p>
<p>All&#8217;indirizzo <strong>http://download.bareos.org/bareos/release/17.2/Debian_9.0/</strong> è possibile vedere l&#8217;ultima versione rilasciata per Debian 9.</p>
<p>Creiamo il file <strong>/etc/apt/sources.list.d/bareos.list</strong> ed inseriamo il seguente contenuto:<br />
<code>echo "deb http://download.bareos.org/bareos/release/17.2/Debian_9.0/ /" >/etc/apt/sources.list.d/bareos.list</code></p>
<p>Aggiungiamo la chiave del repository:<br />
<code>wget -q http://download.bareos.org/bareos/release/17.2/Debian_9.0/Release.key -O- | apt-key add - </code></p>
<p>Aggiorniamo apt:<br />
<code>apt-get update</code></p>
<p>A questo punto installiamo i pacchetti necessari. Come database io ho usato sqlite3, perché per il mio progetto non serviva altro, ma volendo si può usare anche mysql o postgres come backend DB.<br />
Procediamo:<br />
<code>apt-get install bareos bareos-director bareos-storage bareos-client bareos-bconsole bareos-tools bareos-filedaemon bareos-common bareos-database-common bareos-database-tools bareos-database-sqlite3</code></p>
<p>Avviamo i vari servizi:<br />
<code>service bareos-dir start<br />
service bareos-sd start<br />
service bareos-fd start</code></p>
<p>Installiamo anche bareos-webui:<br />
<code>apt-get install bareos-webui</code></p>
<p>Riavviamo apache:<br />
<code>service apache2 restart</code></p>
<p>Il file di configurazione sarà posizionato in <strong>/etc/apache2/conf-available/bareos-webui.conf</strong></p>
<p>Aggiungiamo un utente per poter accedere a bareos-webui. Questo lo facciamo con <strong>bconsole</strong>:<br />
<code>bconsole<br />
configure add console name=admin password=secret profile=webui-admin<br />
quit</code></p>
<p>I dati di connessione saranno quelli qui definiti e verrà creato (come indicato nella risposta al precedente comando) in automatico il file <strong>/etc/bareos/bareos-dir.d/console/admin.conf</strong>.</p>
<p>Per eventuali <strong>modifiche manuali</strong> al file, ricordarsi di riavviare il director:<br />
<code>service bareos-dir restart</code></p>
<p>Bene, ora richiamiamo nel nostro browser bareos-webui, http://XXX.XXX.XXX.XXX/bareos-webui dove <strong>XXX.XXX.XXX.XXX</strong> sarà l&#8217;IP o il nome del server di backup.</p>
<p><strong>Aggiungere un client</strong><br />
Per un client linux Debian, la procedura è abbastanza semplice, per altri sistemi bisogna recuperare il pacchetto del client da <a href="http://download.bareos.org/bareos/release/17.2/" rel="noopener noreferrer" target="_blank">http://download.bareos.org/bareos/release/17.2/</a>.</p>
<p>Vediamo come aggiungere un client debian.<br />
[<strong>LATO CLIENT</strong>]<br />
Creiamo il file <strong>/etc/apt/sources.list.d/bareos.list</strong> ed inseriamo il seguente contenuto:<br />
<code>echo "deb http://download.bareos.org/bareos/release/17.2/Debian_9.0/ /" >/etc/apt/sources.list.d/bareos.list</code></p>
<p>Aggiungiamo la chiave del repository:<br />
<code>wget -q http://download.bareos.org/bareos/release/17.2/Debian_9.0/Release.key -O- | apt-key add - </code></p>
<p>Aggiorniamo apt:<br />
<code>apt-get update</code></p>
<p>Installiamo il solo pacchetto client:<br />
<code>apt-get install bareos-filedaemon </code></p>
<p>Se occorre anche bconsole per la gestione da remoto:<br />
<code>apt-get install bareos-filedaemon bareos-bconsole</code></p>
<p>[<strong>LATO SERVER</strong>]<br />
Innanzitutto assicuriamoci che il campo &#8220;<strong>Address</strong>&#8221; del file <strong>/etc/bareos/bareos-dir.d/storage/File.conf</strong> contenga il <strong>FQDN del server</strong>, altrimenti il client non riuscirà a collegarsi.</p>
<p>Avviamo bconsole ed aggiungiamo i riferimenti per il client:<br />
<code>bconsole<br />
configure add client name=client2-fd address=192.168.1.2 password=secret </code></p>
<p>dove client2-fd sarà il nome del client, <strong>192.168.1.2</strong> e <strong>secret</strong> la password.</p>
<p>Questo creerà due files:<br />
&#8211; /etc/bareos/bareos-dir.d/client/client2-fd.conf<br />
&#8211; /etc/bareos/bareos-dir-export/client/client2-fd/bareos-fd.d/director/bareos-dir.conf</p>
<p>Il secondo file va copiato nel client:<br />
<code>scp /etc/bareos/bareos-dir-export/client/client2-fd/bareos-fd.d/director/bareos-dir.conf root@client2.example.com:/etc/bareos/bareos-fd.d/director/</code></p>
<p>[LATO CLIENT]<br />
Ricarichiamo il filedirector:<br />
<code>service bareos-fd restart</code></p>
<p>Modificare l&#8217;IP del server per bconsole in <strong>/etc/bareos/bconsole.conf</strong>.</p>
<p>[LATO SERVER]<br />
Verificare che il client sia correttamente connesso:<br />
<code>bconsole<br />
status client=client2-fd </code></p>
<p><strong>Note</strong><br />
<strong>Firewall</strong>: Le porte firewall da aprire sono:<br />
Console -> DIR:9101<br />
DIR     -> SD:9103<br />
DIR     -> FD:9102<br />
FD      -> SD:9103</p>
<p><strong>Configurazione</strong>: Per la configurazione, bisogna far riferimento a questi files:<br />
<strong>/etc/bareos/bareos-sd.d/device/FileStorage.conf</strong>: qui si trova il percorso in cui vengono salvati i backup.<br />
<strong>/etc/bareos/bareos-dir.d/client/bareos-fd.conf</strong>: qui la configurazione dei client<br />
<strong>/etc/bareos/bareos-dir.d/fileset/</strong>: qui sono presenti i files con la configurazione dei fileset (ovvero di cosa fare il backup, cosa che può essere differente in modo da avere sistemi differenti per i vari client)<br />
<strong>/etc/bareos/bareos-dir.d/job/</strong>: qui i files con la configurazione dei vari job di backup e del job di restore con il path di dove verranno recuperati i files<br />
<strong>/etc/bareos/bareos-dir.d/jobdefs/</strong>: qui la definizione del job, dove in pratica si definisce quale job usare per i vari client, etc<br />
<strong>/etc/bareos/bareos-dir.d/pool/</strong>: qui la definizione dei vari pool (es Full, Differential, etc)<br />
Dopo la modifica, per verificare che le impostazioni siano corrette, digitare:<br />
<code>bareos-fd -t<br />
bconsole -t</code></p>
<hr>
<p><strong>Comandi utili per bconsole</strong>:<br />
<strong>status dir</strong>: vedere le operazioni effettuate (backup/ripristino)<br />
<strong>show filesets</strong>: vedere i fileset definiti<br />
<strong>run</strong>: avviare un job (backup/restore)<br />
<strong>messages</strong>: visualizzare i messaggi del director<br />
<strong>restore all</strong>: avviare il restore di tutti i files in backup<br />
<strong>restore</strong>: avviare il restore di un file<br />
<strong>quit</strong>: uscire da bconsole<br />
<strong>Ripristino da client</strong>: Una piccola nota per l&#8217;uso di <strong>bconsole</strong> sul client, sempre utile in caso di necessità. Per il ripristino di un file, il client può fare tutto in autonomia usando <strong>bconsole</strong>. Ad esempio, vediamo come ripristinare dall&#8217;ultimo backup il file <strong>/etc/monit/monitrc</strong>:<br />
<code>bconsole<br />
restore<br />
5<br />
mark /etc/monit/monitrc<br />
done<br />
yes<br />
quit</code></p>
<p>e dopo poco il file si troverà in <strong>/tmp/bareos-restores/etc/monit/monitrc</strong></p>
<p>Ci siamo, ora potete iniziare ad usare il vostro server di backup 🙂</p>
<p>enjoy!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.smsoft.it/2018/01/23/installare-bareos-bareoswebui-17-debian-9-stretch/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
