% $Id$

\documentclass{beamer}

% This file is a solution template for:

% - Talk at a conference/colloquium.
% - Talk length is about 20min.
% - Style is ornate.



% Copyright 2004 by Till Tantau <tantau@users.sourceforge.net>.
%
% In principle, this file can be redistributed and/or modified under
% the terms of the GNU Public License, version 2.
%
% However, this file is supposed to be a template to be modified
% for your own needs. For this reason, if you use this file as a
% template and not specifically distribute it as part of a another
% package/program, I grant the extra permission to freely copy and
% modify this file as you see fit and even to delete this copyright
% notice. 


\mode<presentation>
{
  \usetheme{Warsaw}
  % or ...

  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


\usepackage[english]{babel}
% or whatever

%\usepackage[latin1]{inputenc}
\usepackage[utf8x]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title[Backup e Restore in GNU/Linux] % (optional, use only with long paper titles)
{Strumenti di Backup e Restore dei dati in GNU/Linux}

\subtitle
{ovvero: affrontare gli imprevisti sfidando la Legge di Murphy :-)}

\author
{Francesco~Minafra <hitcho@lugbari.org>}
% - Give the names in the same order as the appear in the paper.
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\institute[Linux User Group di Bari] % (optional, but mostly needed)
{Linux User Group di Bari}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date[LD08] % (optional, should be abbreviation of conference name)
{Linux Day 2008, \\
 Tecnopolis -- 25 Ottobre 2008}
% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\subject{Free and Open Source Software, GNU/Linux, Backup and Restore}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

\pgfdeclareimage[height=1cm]{lugbari-logo}{sticker_sole}
\logo{\pgfuseimage{lugbari-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
%\AtBeginSubsection[]
%{
%  \begin{frame}<beamer>{Outline}
%    \tableofcontents[currentsection,currentsubsection]
%  \end{frame}
%}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}[fragile]

\tiny
\begin{verbatim}

Copyright (c) 2008 Francesco Minafra.

Permission  is  granted to  copy,  distribute  and/or modify  this
document under  the terms of  the GNU Free  Documentation License,
Version 1.2  or any later  version published by the  Free Software
Foundation; with  no Invariant Sections, no  FrontCover Texts, and
no  BackCover  Texts. A  copy  of  the  license  can be  found  at
http://www.gnu.org/licenses/fdl-1.2.txt
\end{verbatim}

\end{frame}

\begin{frame}{Sommario}
  \tableofcontents
  % You might wish to add the option [pausesections]
\end{frame}


% Structuring a talk is a difficult task and the following structure
% may not be suitable. Here are some rules that apply for this
% solution: 

% - Exactly two or three sections (other than the summary).
% - At *most* three subsections per section.
% - Talk about 30s to 2min per frame. So there should be between about
%   15 and 30 frames, all told.

% - A conference audience is likely to know very little of what you
%   are going to talk about. So *simplify*!
% - In a 20min talk, getting the main ideas across is hard
%   enough. Leave out details, even if it means being less precise than
%   you think necessary.
% - If you omit details that are vital to the proof/implementation,
%   just say so once. Everybody will be happy with that.

\section{Strategie di Backup \& Restore}

\subsection{Cause comuni di perdita dati}

\begin{frame}{Cause comuni di perdita dati}
  % - A title should summarize the slide in an understandable fashion
  %   for anyone how does not follow everything on the slide itself.
  
  \begin{block}{Legge di Murphy}
    Se qualcosa può andar male {\em \alert{lo farà}}.
  \end{block}
    \begin{itemize}
  \item
    Cancellazione accidentale di file/programmi (\alert{\texttt \# rm -rf /})
  \item
    Filesystem/database corrotto
  \item
    Hardware failure
  \item
    Software bugs
  \item
    Eventuali {\em \alert{buchi neri}} prodotti da LHC \ldots.
  \end{itemize}
  Ci sono poi i casi di danneggiamento intenzionale!
\end{frame}

\begin{frame}{Hardware ridondante}
  Si tende a pensare che disporre di:
  \begin{itemize}
  \item
    UPS
  \item
    sistema RAID superfigo
  \item
    gran parte del sistema ridondato
  \end{itemize}
  possa mettere al sicuro dalle perdite di dati.
  \begin{block}{\alert{ATTENZIONE}}
    si sta cadendo in un {\em falso} senso di sicurezza.
  \end{block}
  
\end{frame}


\subsection{Tipi di approccio ai Backup}

\begin{frame}{Backup come \`ancora di salvezza}
L'esperienza di generazioni di informatici dimostra che:
  \begin{itemize}
  \item
    hardware in sé non mette al sicuro da perdite di dati
  \item
    occorre una {\em policy} di protezione dei dati
  \item
    Backup (e Restore) rivestono un ruolo primario
  \end{itemize}
\end{frame}

\begin{frame}{Classificazione dei Backup}
  \begin{itemize}
  \item
    \alert{FULL} Backup
  \item
    Backup \alert{Incrementale}: cambiamenti rispetto all'ultimo  (FULL o incrementale)
  \item
    Backup \alert{Differenziale}: cambiamenti rispetto all'ultimo FULL 
  \end{itemize}
  Tipicamente l'{\em incrementale} viene eseguito giornalmente. Il {\em differenziale} e il {\em FULL} con 
cadenza settimanale o mensile. (\alert{scripted})
\end{frame}

\begin{frame}{Dove conservarli}
  
  \begin{itemize}
  \item
    Utilizzare supporti rimovibili
  \item
    Conservare i supporti in un altro luogo
  \item
    Se possibile, utilizzare la rete
     \end{itemize}
  \begin{block}{NOTA}
    Non ha molto senso conservare backup sullo stesso sistema di origine 
  \end{block}

\end{frame}


\begin{frame}{Cosa salvaguardare}
  \begin{itemize}
  \item
    Sicuramente i dati degli utenti (\alert{\texttt /home})
  \item
    La configurazione del sistema (\alert{\texttt /etc})
  \item
    Dati relativi a servizi specifici (\alert{\texttt /var/www})
  \item
    Escludere ciò che può essere ripristinato in altro modo
  \end{itemize}

  \begin{block}{NOTA}
    Ogni distribuzione permette di salvare l'elenco dei pacchetti installati
    per poi facilitare un ripristino
  \end{block}

\end{frame}


\section{Programmi presenti nelle distribuzioni}

\subsection{Backup locale}

\begin{frame}{Programmi per il Backup locale}
  \begin{block}{Cercando con Google vediamo che...}
    Esistono innumerevoli {\em strumenti} per il backup sotto GNU/Linux
    ma spesso si tratta di script o interfacce verso qualcuno dei seguenti programmi
  \end{block}

  \begin{itemize}
  \item
    semplice copia con \texttt{cp}
  \item
    GNU \texttt{tar}
  \item
    \texttt{rsync}
  \item
    \texttt{dump} oppure \texttt{dd}
  \end{itemize}

\end{frame}

\begin{frame}{Esempi}
  \begin{block}{ESEMPIO di tool grafico}
    \texttt{sbackup} è un tool sviluppato per Ubuntu che facilita la creazione di backup,
producendo file leggibili con \texttt{tar}.
  \end{block}
  \begin{block}{ESEMPIO di tool testuale}
    \texttt{dar} è un tool testuale che permette la creazione di backup multivolume. 
    \`E basato su \texttt{tar} ma usa un formato di dati diverso per permettere il multivolume.
  \end{block}



\end{frame}

\begin{frame}{Live Backup}
Strumenti generalmente usati su partizioni che non sono 
montate nel filesystem. Con alcune eccezioni\ldots
  \begin{itemize}
  \item
    applicazioni che aggiornano frequentemente i dati
  \item
    sistemi che non possono essere tenuti offline per il tempo occorrente ad un Backup completo
  \end{itemize}

\begin{block}{Che si fa in questi casi?}
  si utilizzano funzionalita' avanzate come LVM2 o filesystem
che supportano nativamente gli {\em snapshot}
\end{block}


\end{frame}


\subsection{Backup centralizzato via rete}

\begin{frame}{Problema del {\em lazy user}}
Generalmente l'utente finale è poco attento alla problematica del Backup. Si rende necessario
quindi {\em forzare} questa pratica, eventualmente anche a sua insaputa! Alcune soluzioni:

  \begin{itemize}
  \item
    usare un filesystem distribuito (NFS, AFS, \ldots)
  \item
    usare un tool per i backup centralizzati:
    \begin{itemize}
    \item
      Amanda
    \item
      Bacula
    \item
      BackuPC
    \end{itemize}
  \end{itemize}
\end{frame}

%\begin{frame}{Make Titles Informative.}
%\end{frame}

%\begin{frame}{Make Titles Informative.}
%\end{frame}



\section*{Ricapitolando}

\begin{frame}{Ricapitolando}
%
% Keep the summary *very short*.
  \begin{itemize}
  \item
    Il mondo è pieno di insidie. Questo vale anche per i dati\ldots
  \item
    Non fidatevi delle soluzioni HW ridondate (vedi il problema del RAID5: \texttt{http://blogs.zdnet.com/storage/?p=162})
  \item
    Le distribuzioni GNU/Linux contengono dei tool che assistono nelle operazioni di B\&R, generalmente molto flessibili (creazione di script) o dotate di interfacce semplici da usare.
  \end{itemize}
  
  % The following outlook is optional.
%  \vskip0pt plus.5fill
%  \begin{itemize}
%  \item
%    Outlook
%    \begin{itemize}
%    \item
%      Something you haven't solved.
%    \item
%      Something else you haven't solved.
%    \end{itemize}
%  \end{itemize}
\end{frame}



% All of the following is optional and typically not needed. 
\appendix
\section<presentation>*{Appendice}
\subsection<presentation>*{Per approfondire}

\begin{frame}{Per approfondire}
    
  \begin{thebibliography}{10}
    
  \beamertemplatearticlebibitems

  \bibitem{halfgaar}
    W.~Cazemier
    \newblock Backing up Linux and other Unix(-like) systems.
    \newblock \texttt{http://www.halfgaar.net/backing-up-unix}
  \end{thebibliography}
\end{frame}

\end{document}


