\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage[frenchb]{babel}
\usepackage{hyperref}
\usepackage{pgf}
\usepackage{eurosym}
\DeclareUnicodeCharacter{20AC}{\euro}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot} % Needs TeXlive 2013 ... 

\usetheme{Rochester}

% Page number n/tot in the lower right corner
\usefoottemplate{
  \begin{beamercolorbox}[ht=2.25ex,dp=4ex,right,ignorebg]{date in head/foot}
    \usebeamerfont{date in head/foot}
    \insertframenumber/\inserttotalframenumber
  \end{beamercolorbox}
  }
\usenavigationsymbolstemplate{}

% \graphicspath{{../images/}}

% Color for links
\definecolor{darkblue}{rgb}{0.,0.2,0.375} 
\hypersetup{
  colorlinks=true,
  urlcolor=darkblue,
  linkcolor=black
}
% also use it for page numbers 
\setbeamercolor*{palette secondary}{fg=darkblue,bg=black!25}

% a macro for figures
\newcommand\fig[2]{
  \centerline{\includegraphics[width=#2]{#1}}}

% Tetaneutral.net logo
\definecolor{ttnn1}{rgb}{.695,.645,.551}
\definecolor{ttnn2}{rgb}{.906,.839,.730}
\newcommand{\ttnn}{\Huge\color{ttnn1}{\textbf{teta}}\color{ttnn2}{neutral}\color{ttnn1}{.net}}

% go
\title{Retour d'expérience sur Borg Backup}
\author{Laurent Guerby}
\institute{\ttnn{}}
\date{Capitoul - Toulouse - 23 juin 2016}


\AtBeginSection[]{
\begin{frame}<beamer>
\frametitle{Agenda}
\tableofcontents[currentsection]
\end{frame}
}
%----------------------------------------------------------------------
\begin{document}
%----------------------------------------------------------------------
\begin{frame}[plain]
\maketitle
\end{frame}
%----------------------------------------------------------------------
\begin{frame}
\frametitle{Licence}

\centerline{\includegraphics[width=2cm]{88x31}}
\vspace{1em}
{\scriptsize
Ce document est sous licence \\[1ex]
\emph{Creative Commons Paternité - Partage à l'Identique 3.0 non transposé.}\\[10pt]

Le texte complet de cette licence est disponible à l'adresse~:\\
\url{http://creativecommons.org/licenses/by-sa/3.0/}}

\end{frame}
%----------------------------------------------------------------------
\begin{frame}{À propos de l'orateur}
\textbf{Laurent Guerby}
\begin{itemize}
\item Ingénieur Télécom Bretagne 1996
\item Président de l'association tetaneutral.net
\item Ingénieur d'étude IRIT-UT2J depuis le 1er juin 2016
\item \url{mailto:laurent@guerby.net}\\
\end{itemize}
\end{frame}

%----------------------------------------------------------------------
\begin{frame}
  \frametitle{Agenda}
  \tableofcontents
\end{frame}
%----------------------------------------------------------------------
\section{Introduction}
%----------------------------------------------------------------------
\begin{frame}
\frametitle{BorgBackup Project}
\begin{itemize}
\item Documentation \url{https://borgbackup.readthedocs.io}
\item Source \url{https://github.com/borgbackup}
\item Tracker \url{https://github.com/borgbackup/borg/issues}
\item IRC channel \texttt{\#borgbackup} on \url{irc.freenode.net}
\item ThomasWaldmann
\end{itemize}
\end{frame}
%----------------------------------------------------------------------
\begin{frame}
\frametitle{BorgBackup ?}
\begin{itemize}
\item BorgBackup (short: Borg) is a deduplicating backup program. Optionally, it supports compression and authenticated encryption.
\item The main goal of Borg is to provide an efficient and secure way to backup data. The data deduplication technique used makes Borg suitable for daily backups since only changes are stored. The authenticated encryption technique makes it suitable for backups to not fully trusted targets.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Timeline}
\begin{itemize}
\item Borg is a fork of Attic https://github.com/jborg/attic
\item Current version is 1.0.3, 1.0 march 2016
\item Python 3.4 (91 \% ) plus some C code
\end{itemize}
\end{frame}

%----------------------------------------------------------------------
\section{Running}
%----------------------------------------------------------------------
%----------------------------------------------------------------------
\begin{frame}
\frametitle{Step by Step}
\begin{itemize}
\item \texttt{borg init /path/to/repo}
\item \texttt{borg create /path/to/repo::20160623 ~/src ~/Documents --exclude '*.pyc'}
\item \texttt{borg list /path/to/repo}
\item \texttt{borg extract /path/to/repo::20160623}
\item \texttt{borg extract /path/to/repo::20160623 home/USERNAME/src}
\end{itemize}
\end{frame}
%----------------------------------------------------------------------
\begin{frame}
\frametitle{Mount Access}
\begin{itemize}
\item \texttt{borg mount /path/to/repo::20160623 /tmp/mymountpoint}
\item \texttt{ls /tmp/mymountpoint}
\item \texttt{fusermount -u /tmp/mymountpoint}
\end{itemize}
\end{frame}
%----------------------------------------------------------------------
\begin{frame}
\frametitle{Remote}
\begin{itemize}
\item \texttt{borg init user@hostname:/path/to/repo}
\item \texttt{borg init ssh://user@hostname:port/path/to/repo}
\item \texttt{command="borg serve --restrict-to-path /path/to/repo",\\no-pty,no-agent-forwarding,\\no-port-forwarding,no-X11-forwarding,\\no-user-rc ssh-rsa ...}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Encryption}
\begin{itemize}
\item \texttt{borg init --encryption=keyfile -v /path/to/repo}
\item \texttt{Enter new passphrase: }
\item \texttt{Key in "/root/.config/borg/keys/mnt\_backup" created}
\item \texttt{export BORG\_PASSPHRASE=xxx}
\end{itemize}
\end{frame}


\begin{frame}
\frametitle{Performance}
\begin{itemize}
\item \texttt{Duration: 7 minutes 5.34 seconds}
\item \texttt{Number of files: 2410575}
\item \texttt{Original size      Compressed size    Deduplicated size\\This archive:              239.23 GB            162.11 GB            294.81 MB\\All archives:               19.16 TB             13.08 TB            166.94 GB}
\end{itemize}
\end{frame}

%----------------------------------------------------------------------
\section{Internals}
%----------------------------------------------------------------------

\begin{frame}
\frametitle{Repo Format}
\begin{itemize}
\item Simple directory, a few files \texttt{repo/data/config} and \texttt{data} subdirectory
\item \texttt{repo/data/0/9996}, max 10000 files per directory, files about 5 megabytes
\item independant from number of files to backup
\item rsync works perfectly for duplicating a repo
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Checkpointing}
\begin{itemize}
\item \texttt{--checkpoint-interval SECONDS\\
  write checkpoint every SECONDS seconds (Default: 300)}
\item You can restart a backup
\item or just create a new, will go faster one thanks to deduplication
\end{itemize}
\end{frame}

%----------------------------------------------------------------------
\section{Conclusion}
%----------------------------------------------------------------------
\begin{frame}
\frametitle{Borg is great}
\begin{itemize}
\item Borg solves lots of backup management issues
\item All sysadmins I told about borg switched to it
\end{itemize}
\end{frame}
%----------------------------------------------------------------------
\begin{frame}[plain]
\begin{center}
\Huge{Questions ?}
\end{center}
\vfill
\begin{flushright}
\url{mailto:question@tetaneutral.net}
\end{flushright}
\end{frame}
%----------------------------------------------------------------------
\end{document}
