197 lines
9.8 KiB
HTML
197 lines
9.8 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="https://norgbackup.net/main.css">
|
|
<link rel="stylesheet" href="https://norgbackup.net/norg.css">
|
|
<link rel="icon" href="https://norgbackup.net/favicon.png">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
<title> Norg | Extract/Restore a Backup </title>
|
|
</head>
|
|
<body>
|
|
|
|
<main>
|
|
|
|
<nav>
|
|
<a href="https://norgbackup.net">
|
|
<img src="https://norgbackup.net/norg-logo.png" alt="logo"/>
|
|
</a>
|
|
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
|
|
<div id="trees">
|
|
<input class="tree-toggle" type="checkbox" id="introduction"
|
|
/>
|
|
<label class="tree-toggle-label"
|
|
for="introduction">Introduction</label>
|
|
|
|
<ul class="subtree">
|
|
<li >
|
|
<a href="https://norgbackup.net/introduction/about-norg/">About Norg</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/introduction/system-compatibility/">System Compatibility</a>
|
|
</li>
|
|
|
|
</ul>
|
|
<input class="tree-toggle" type="checkbox" id="reference-guides"
|
|
/>
|
|
<label class="tree-toggle-label"
|
|
for="reference-guides">Reference Guides</label>
|
|
|
|
<ul class="subtree">
|
|
<li >
|
|
<a href="https://norgbackup.net/reference/example-configuration/">Example Configuration</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/reference/command-line/">Command Line Reference</a>
|
|
</li>
|
|
|
|
</ul>
|
|
<input class="tree-toggle" type="checkbox" id="usage"
|
|
checked/>
|
|
<label class="tree-toggle-label"
|
|
for="usage">Usage</label>
|
|
|
|
<ul class="subtree">
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/setup/">Setting up Norg</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/configuration/">Configuring Norg</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/redundancy/">Backup Redundancy</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/initialize/">Initialize Repositories</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/create-a-backup/">Create a Backup</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/inspect-your-backups/">Inspect your Backups</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/monitoring-backup-jobs/">Knowing your Backup has Run</a>
|
|
</li>
|
|
|
|
<li class="active">
|
|
<a href="https://norgbackup.net/usage/extract-a-backup/">Extract/Restore a Backup</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/before-and-after-actions/">Before and After Actions</a>
|
|
</li>
|
|
|
|
<li >
|
|
<a href="https://norgbackup.net/usage/both-borg-and-restic/">Using both Borg and Restic</a>
|
|
</li>
|
|
|
|
</ul>
|
|
<input class="tree-toggle" type="checkbox" id="download"
|
|
/>
|
|
<label class="tree-toggle-label"
|
|
for="download">Download</label>
|
|
|
|
<ul class="subtree">
|
|
<li >
|
|
<a href="https://norgbackup.net/download/download-norg/">Download Norg</a>
|
|
</li>
|
|
|
|
</ul>
|
|
<input class="tree-toggle" type="checkbox" id="contributing-to-norg"
|
|
/>
|
|
<label class="tree-toggle-label"
|
|
for="contributing-to-norg">Contributing to Norg</label>
|
|
|
|
<ul class="subtree">
|
|
<li >
|
|
<a href="https://norgbackup.net/contributing/contributing/">Contributing</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
<article>
|
|
|
|
<div id="on_right">
|
|
<span id="search-ico" class="ms-Icon--Search"></span>
|
|
</div>
|
|
<div class="search-container">
|
|
<input id="search" type="search" placeholder="Search as you type...">
|
|
<div class="search-results">
|
|
<div class="search-results__header"></div>
|
|
<ul class="search-results__items"></ul>
|
|
</div>
|
|
</div>
|
|
<div id="wrap">
|
|
<h1>Extract/Restore a Backup</h1>
|
|
|
|
<blockquote>
|
|
<p><em>"People don't want backups. People want Restores."</em></p>
|
|
</blockquote>
|
|
<p>What's the point in backing up if you can't restore from it?<br />
|
|
Of course, Norg has a restore functionality, and can restore an entire backup to
|
|
a directory of your choice.<br />
|
|
To protect current data, Norg will only restore to an empty directory, so it is
|
|
important to specify a directory that is empty. Norg will create directories that
|
|
do not exist.</p>
|
|
<h2 id="steps">Steps</h2>
|
|
<p>First, find the backup you wish to restore. This can easily be done by using
|
|
the <a href="http://127.0.0.1:1111/usage/inspect-your-backups#list-existing-backups"><code>list</code></a> command.</p>
|
|
<pre data-lang="sh" style="background-color:#eff1f5;color:#4f5b66;" class="language-sh "><code class="language-sh" data-lang="sh"><span style="color:#bf616a;">norg -c</span><span> myconfig.toml list
|
|
</span></code></pre>
|
|
<p>Which will give you an output similar to this:</p>
|
|
<pre data-lang="sh" style="background-color:#eff1f5;color:#4f5b66;" class="language-sh "><code class="language-sh" data-lang="sh"><span style="color:#a7adba;"># For Borg
|
|
</span><span style="color:#bf616a;">hostname-2024-08-23T15:46:19.037234</span><span> Fri, 2024-08-23 15:46:19
|
|
</span><span style="color:#bf616a;">hostname-2024-08-24T15:21:17.738163</span><span> Sat, 2024-08-24 15:21:18
|
|
</span><span>
|
|
</span><span style="color:#a7adba;"># or for Restic
|
|
</span><span style="color:#bf616a;">ID</span><span> Time Host Paths Size
|
|
</span><span style="color:#bf616a;">---------------------------------------------------------------
|
|
</span><span style="color:#bf616a;">5f2bc4f1</span><span> 2024-08-23 10:30:25 hostname /home/me 96.361 MiB
|
|
</span><span style="color:#bf616a;">e0de9b6c</span><span> 2024-08-24 11:50:52 hostname /home/me 94.123 MiB
|
|
</span></code></pre>
|
|
<p>When you know which archive or snapshot you want to extract, you can run the
|
|
<code>extract</code> command with <code>repository</code>, <code>archive</code> and <code>destination</code> parameters.</p>
|
|
<pre data-lang="sh" style="background-color:#eff1f5;color:#4f5b66;" class="language-sh "><code class="language-sh" data-lang="sh"><span style="color:#a7adba;"># Borg example
|
|
</span><span style="color:#bf616a;">norg -c</span><span> myconfig.toml extract</span><span style="color:#bf616a;"> -r</span><span> MyBorgRepo</span><span style="color:#bf616a;"> -a</span><span> hostname-2024-08-23T15:46:19.037234</span><span style="color:#bf616a;"> --destination</span><span> /my/restore/location
|
|
</span><span>
|
|
</span><span style="color:#a7adba;"># Restic example
|
|
</span><span style="color:#bf616a;">norg -c</span><span> myconfig.toml extract</span><span style="color:#bf616a;"> -r</span><span> MyResticRepo</span><span style="color:#bf616a;"> -a</span><span> 5f2bc4f1</span><span style="color:#bf616a;"> --destination</span><span> /my/restore/location
|
|
</span></code></pre>
|
|
<h2 id="further-command-line-reference">Further Command Line Reference</h2>
|
|
<p>Like with all other commands, you can specify Borg/Restic command line parameters after all other parameters to adjust how the extract will run. Please see <a href="/usage/both-borg-and-restic/">Using both Borg and Restic</a> for more information.</p>
|
|
|
|
|
|
</div>
|
|
<hr />
|
|
<h2>Help us improve this documentation.</h2>
|
|
<p>If you find an error, or think something could be explained better,
|
|
<a href="https://codeberg.org/pswilde/norgbackup/issues">raise an issue</a> to
|
|
send your feedback.</p>
|
|
<footer>
|
|
<p>Norg Backup Utility © 2024 Paul Wilde<br/>
|
|
Site created using <a href="https://getzola.org">Zola</a> using the
|
|
<a href="https://github.com/codeandmedia/zola_easydocs_theme">easydocs</a> theme.</p>
|
|
</footer>
|
|
</article>
|
|
</main>
|
|
|
|
|
|
<script type="text/javascript" src="https://norgbackup.net/elasticlunr.min.js" defer></script>
|
|
<script type="text/javascript" src="https://norgbackup.net/search_index.en.js" defer></script>
|
|
<script type="text/javascript" src="https://norgbackup.net/js.js" defer></script>
|
|
|
|
</body>
|
|
</html>
|