<h1>Technical background for TISBackup<aclass="headerlink"href="#technical-background-for-tisbackup"title="Permalink to this headline">¶</a></h1>
<p>The deduplication of this solution is based on the hardlinks
of ext3/4 file systems used for storing backup files.</p>
<p>The backup server must run <strongclass="program">rsync</strong> in server mode,
and the workstations to be backed up must be equipped with <strongclass="program">rsync</strong>
and <strongclass="program">ssh</strong> (usually basic on machines running GNU/Linux,
with <strongclass="program">cygwin</strong> (or another tool like <strongclass="program">cwrsync</strong>)
for machines running MS Windows).</p>
<sectionid="tisbackup">
<h2>tisbackup<aclass="headerlink"href="#tisbackup"title="Permalink to this headline">¶</a></h2>
<p><strongclass="program">tisbackup</strong> is a python script that the backup server runs
at regular intervals. The configuration file <codeclass="file docutils literal notranslate"><spanclass="pre">tisbackup.ini</span></code> contains
the details of the tasks to be executed.</p>
<p><strongclass="program">tisbackup</strong> has different options for its execution,
available in the <strongclass="command">tisbackup --help</strong> command,
the main ones being the following:</p>
<ulclass="simple">
<li><p><strongclass="command">backup</strong>: executes all scheduled backups;</p></li>
<li><p><strongclass="command">cleanup</strong>: examines the backups and deletes those
that are older than the defined maximum retention time ;</p></li>
<li><p><strongclass="command">checknagios</strong>: returns the content that can be viewed by nagios ;</p></li>
<li><p><strongclass="command">retryfailed</strong>: redoes the backups that previously failed;</p></li>
<li><p><strongclass="command">exportbackup</strong>: exports the last valid backups
to the specified location (remote, external media, …);</p></li>
<li><p><strongclass="command">register_existing</strong>: scans the backups that have been made
and adds the missing ones to the database;</p></li>
</ul>
</section>
<sectionid="tisbackup-ini">
<h2>tisbackup.ini<aclass="headerlink"href="#tisbackup-ini"title="Permalink to this headline">¶</a></h2>
<p><codeclass="file docutils literal notranslate"><spanclass="pre">tisbackup.ini</span></code> defines the backups to be executed and supervised.
It is written with a simple formalism.</p>
<p>The different types of backups are:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">rsync</span></code>: the backup of a directory by rsync using the rsync protocol;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">rsync+ssh</span></code>: the backup of a directory by rsync with the ssh protocol;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">mysql+ssh</span></code>: saving a mysql database in a gzipped sql file,
with the ssh protocol;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">pgsql+ssh</span></code>: the backup of a postgresql database in a gzipped sql file,
with the ssh protocol;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">xen-xva</span></code>: the backup of a virtual machine running on an XCP server
as an XVA file;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">xen-meta-data</span></code>: the backup of XCP metadata from a virtualization server;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">switch</span></code>: the backup of switches;</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">null</span></code>: null backup of a server that does not require a backup but for which
it is known to be taken into account (Nagios supervision);</p></li>
</ul>
<p>The first part of the <codeclass="file docutils literal notranslate"><spanclass="pre">tisbackup.ini</span></code> file,
starting with the <codeclass="docutils literal notranslate"><spanclass="pre">[Global]</span></code> tag, determines:</p>
<ulclass="simple">
<li><p>the path to the folder where the backups will be stored;</p></li>
<li><p>the maximum retention time of a backup (in days);</p></li>
<li><p>the maximum delay before triggering a nagios critical message (in hours);</p></li>
<li><p>possibly the limit of usable bandwidth;</p></li>
</ul>
<p>The rest of the file lists the different backups to be made,
with specific parameters for each type of backup:</p>
<ulclass="simple">
<li><p>name of the directory in the backup;</p></li>
<li><p>backup type;</p></li>
<li><p>server name;</p></li>
<li><p>directory (in case of a directory backup);</p></li>
<li><p>directories to be excluded (idem);</p></li>
<li><p>location of the ssh key to be used (private key on the backup server);</p></li>
<li><p>name of the database (in case of mysql or postgresql database backup);</p></li>
<li><p>ssh port number to use;</p></li>
<li><p>database user and password (in case of mysql or postgresql database backup);</p></li>
</ul>
</section>
<sectionid="tisbackup-sql">
<h2>tisbackup.sql<aclass="headerlink"href="#tisbackup-sql"title="Permalink to this headline">¶</a></h2>
<p><codeclass="file docutils literal notranslate"><spanclass="pre">tisbackup.sql</span></code> is the <strongclass="program">sqlite</strong> database available
on the backup server, in which the backup information of each
of the backed up areas is stored. It is used in particular to gather
the information necessary for Nagios.</p>
</section>
<sectionid="tisbackup-gui">
<h2>TISbackup GUI<aclass="headerlink"href="#tisbackup-gui"title="Permalink to this headline">¶</a></h2>
<p>Also developed in python, TISbackup GUI is a graphical interface
that allows you to:</p>
<ulclass="simple">
<li><p>visualize the last backups;</p></li>
<li><p>export a backup to a USB media;</p></li>
<li><p>visualize the backups to be made;</p></li>
</ul>
<p><aclass="reference internal"href="_images/clapping-hands-microsoft.png"><imgalt="Clapping hands"src="_images/clapping-hands-microsoft.png"style="width: 36.0px; height: 36.0px;"/></a> You may now go on to the next step
and <aclass="reference internal"href="installing_tisbackup.html#base-debian-server-install"><spanclass="std std-ref">install TISBackup on your Debian</span></a>.</p>
<ahref="installing_tisbackup.html"class="btn btn-neutral float-right"title="Installing and configuring TISBackup on Debian"accesskey="n"rel="next">Next <spanclass="fa fa-arrow-circle-right"aria-hidden="true"></span></a>