<pclass="intro">Like rsync, rdiff-backup is a tool used for incremental backups. Unlike rsync, however rdiff keeps the most-recent file, along with any changes, deletions, etc.</p>
<pclass="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>
<pclass="intro">Rsync is a program that allows for incremental backups. This means that rsync will not create an additional copy of the data when backing up, it will only backup changes to the files/directories, saving bandwidth and storage space.</p>
<p>Replacing $USER and $HOST with the username and hostname/IP for the server</p>
<h2>Restore</h2>
<h2>Restore</h2>
<h2>Advanced</h2>
<p>A restore in rsync doesn't require any rsync code per-se, as you can just copy individual files from the backup location to the restore location.</p>
<p>Alternatively to restore the entire directory, keeping files that haven't changes, and those that have to the time of the last backup, rsync can do that as below</p>
-r recursive. All files/directories in the path will be backed up
-a archive mode. Recursive, but with file permissions, symlinks, etc retained.
-z compress
-b backups
-R relative
-u update - copy only changed files
-P progress
-c compress
-p preserve permissions
-h human readable. Make the output readible by humans
</code></pre>
<h2>Downsides</h2>
<p>Rsync only keeps one copy of the data, and doesn't keep the changes that were made, making it impossible* to restore a file's contents from the day previous. If this is what you're after, look at <ahref="/blog/backup-with-rdiff.html">rdiff-backup</a>.</p>
<p>* Not impossible, as you <em>can</em> set rsync to do this, but it requires a bit of scripting, and isn't as easy as just running the program</p>