You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aney.co.uk/blog/backup-with-rdiff.html

54 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content="Blog, articles, template">
<meta name="author" content="Nathan (Aney) Steel">
<meta name="theme-color" content="white">
<meta name="theme-color" content="black">
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" type="image/png" href="/images/favicon.svg">
<title>Backup with rdiff-backup</title>
</head>
<body>
<header>
<h1>Backup with rdiff-backup</h1>
<hr/>
<nav>
<a href="/">home</a>
<a href="/equipment.html">equipment</a>
<a href="/projects.html">projects</a>
<a href="/blog/">blog</a>
<a href="/sitemap.html">misc</a>
<a href="/support.html">support</a>
</nav>
<hr/>
</header>
<main>
<section>
<p class="intro">Like rsync, rdiff-backup is a tool used for incremental backups. Unlike rsync however, rdiff keeps the most-recent file change, along with any previous changes, deletions, etc.</p>
<h2>Install</h2>
<pre><code>sudo apt install rdiff-backup</code></pre>
<h2>Backup</h2>
<pre><code>rdiff-backup $dir $backup</code></pre>
<h2>Restore</h2>
<pre><code>rdiff-backup -r 2D $backup $restore_dir</code></pre>
<h2>Advanced</h2>
<h3>Only keep backups for a certain time period</h3>
<pre><code>rdiff-backup --force --remove-older-than 2M $backup</code></pre>
<p>This will remove all backups older than 2 months from $backup.</p>
</section>
</main>
<footer>
<hr/>
<p>Written by <a href="http://aney.co.uk" target="_blank" rel="noopener">@aney</a> with <a href="https://danluu.com/web-bloat/" target="_blank" rel="noopener">web bloat</a> in mind | <a href="https://github.com/Aney/website" target="_blank" rel="noopener">Source Code</a></p>
</footer>
</body>
</html>