TISbackup/docs/using_tisbackup.html
2024-11-29 00:54:09 +01:00

354 lines
12 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta content="Using TISBackup" name="description" />
<meta content="Documentation, TISBackup, usage, options, exporting" name="keywords" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Using TISBackup &mdash; TISBackup 1.8.2 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="_static/css/ribbon.css" type="text/css" />
<link rel="stylesheet" href="_static/theme_overrides.css" type="text/css" />
<link rel="shortcut icon" href="_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Contacting Tranquil IT" href="tranquil-it-contacts.html" />
<link rel="prev" title="Configuring the backup jobs" href="configuring_tisbackup.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> TISBackup
</a>
<div class="version">
1.8
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p><span class="caption-text">Presenting TISBackup</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="presenting_tisbackup.html">Technical background for TISBackup</a></li>
<li class="toctree-l1"><a class="reference internal" href="installing_tisbackup.html">Installing and configuring TISBackup on Debian</a></li>
<li class="toctree-l1"><a class="reference internal" href="configuring_tisbackup.html">Configuring the backup jobs</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Using TISBackup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#exporting-backups">Exporting backups</a></li>
</ul>
</li>
</ul>
<p><span class="caption-text">Appendix</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="tranquil-it-contacts.html">Contacting Tranquil IT</a></li>
<li class="toctree-l1"><a class="reference internal" href="screenshots.html">Screenshots of TISBackup</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">TISBackup</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Using TISBackup</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/using_tisbackup.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="using-tisbackup">
<h1>Using TISBackup<a class="headerlink" href="#using-tisbackup" title="Permalink to this headline"></a></h1>
<p id="id1">As seen in the <a class="reference internal" href="installing_tisbackup.html#install-tisbackup-debian"><span class="std std-ref">section on installing TISbackup</span></a>,
once the TISBackup installation is up and running,
we have the choice of these actions:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="na">backup: launch all backups or a specific one if -s option is used</span>
<span class="na">cleanup: removed backups older than retension period</span>
<span class="na">checknagios: check all or a specific backup against max_backup_age parameter</span>
<span class="na">dumpstat: dump the content of database for the last 20 backups</span>
<span class="na">retryfailed: try to relaunch the last failed backups</span>
<span class="na">listdrivers: list available backup types and parameters for config inifile</span>
<span class="na">exportbackup: copy lastest OK backups from local to location defned by --exportdir parameter</span>
<span class="na">register_existing: scan backup directories and add missing backups to database</span>
</pre></div>
</div>
<p>The 3 following options can be used with any tisbackup action.</p>
<ul>
<li><p>the <code class="docutils literal notranslate"><span class="pre">-c</span></code> <em>config_file</em> option allows to specify a backup file,
by default <code class="file docutils literal notranslate"><span class="pre">/etc/tis/tisbackup-config.ini</span></code> is used:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup backup -c /etc/toto/test-config.ini
</pre></div>
</div>
</li>
<li><p>the <code class="docutils literal notranslate"><span class="pre">-s</span></code> <em>section_name</em> option allows to launch only the action
on the specified section:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup backup -s section_name
</pre></div>
</div>
</li>
<li><p>the <code class="docutils literal notranslate"><span class="pre">-d</span></code> option allows you to simulate an action in order
to see the commands launched by it.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup backup -d
</pre></div>
</div>
</li>
<li><p><strong class="command">backup</strong> launches a backup action:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup backup
</pre></div>
</div>
</li>
<li><p><strong class="command">cleanup</strong> removes backups older than the time specified
in the <code class="docutils literal notranslate"><span class="pre">backup_retention_time</span></code> parameter of the configuration file:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup cleanup
</pre></div>
</div>
</li>
<li><p><strong class="command">checknagios</strong> allows the backup information to be uploaded
to the nagios monitoring server:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup checknagios
</pre></div>
</div>
</li>
<li><p><strong class="command">dumpstat</strong> displays all information about the last 20 backups
in tabular format:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup dumpstat
</pre></div>
</div>
</li>
<li><p><strong class="command">retryfailed</strong> restarts only the backup of the failed sections:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup retryfailed
</pre></div>
</div>
</li>
<li><p><strong class="command">listdrivers</strong> lists all the possible types of backups
and their parameters:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup listdrivers
</pre></div>
</div>
</li>
<li><p><strong class="command">exportbackup</strong> copies the last good backup
to a directory, you must use the <code class="docutils literal notranslate"><span class="pre">--exportdir</span></code> option to specify
or copy the export:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>tisbackup exportbackup --exportdir example_directory
</pre></div>
</div>
</li>
<li><p><strong class="command">register_existing</strong> checks the backup directory and saves information
from previous backups to tisbackup in the database;</p></li>
</ul>
<section id="exporting-backups">
<h2>Exporting backups<a class="headerlink" href="#exporting-backups" title="Permalink to this headline"></a></h2>
<p>With this procedure, you will be able to export your backups
on USB Hard Disk Drives for your off-line backup needs.</p>
<p>The partition of your HDD must be <strong>ext4</strong> formated and labeled <em>tisbackup</em>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>fdisk /dev/xvdc
Command <span class="o">(</span>m <span class="k">for</span> <span class="nb">help</span><span class="o">)</span>: n
Select <span class="o">(</span>default p<span class="o">)</span>: p
Partition number <span class="o">(</span><span class="m">1</span>-4, default <span class="m">1</span><span class="o">)</span>: <span class="m">1</span>
<span class="s2">&quot;Enter&quot;</span>
<span class="s2">&quot;Enter&quot;</span>
Command <span class="o">(</span>m <span class="k">for</span> <span class="nb">help</span><span class="o">)</span>: w
mkfs.ext4 /dev/xvdc1
e2label /dev/xvdc1 tisbackup
</pre></div>
</div>
<figure class="align-center" id="id2">
<a class="reference internal image-reference" href="_images/tisbackup_hdd_export.png"><img alt="Exporting a backup to an external USB HDD" src="_images/tisbackup_hdd_export.png" style="width: 940.0px; height: 631.0px;" /></a>
<figcaption>
<p><span class="caption-text">Exporting a backup to an external USB HDD</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id3">
<a class="reference internal image-reference" href="_images/tisbackup_hdd_export_status.png"><img alt="Status of exported backups" src="_images/tisbackup_hdd_export_status.png" style="width: 1067.0px; height: 902.0px;" /></a>
<figcaption>
<p><span class="caption-text">Status of exported backups</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="tranquil-it-contacts.html" class="btn btn-neutral float-right" title="Contacting Tranquil IT" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="configuring_tisbackup.html" class="btn btn-neutral float-left" title="Configuring the backup jobs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2020, Tranquil IT.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-89790248-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-89790248-2');
</script>
</body>
</html>