<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rsync on Michael’s Domain</title><link>https://jeltsch.org/en/tags/rsync/</link><description>Recent content in Rsync on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/rsync/index.xml" rel="self" type="application/rss+xml"/><item><title>Copying with rsync</title><link>https://jeltsch.org/en/copy_with_rsync/</link><pubDate>Mon, 17 Feb 2020 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/copy_with_rsync/</guid><description>&lt;p&gt;Reasons why you should (not always, but often) prefer rsync over cp:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Resume Interrupted Transfers
If you are copying a large file and your terminal session crashes or the power cuts out, cp will simply fail, and you have to start over. rsync can pick up right where it left off, which is a massive time-saver for large datasets.&lt;/li&gt;
&lt;li&gt;Efficiency (Delta-Transfer Algorithm)
rsync is designed to be smart. If you are copying a file that already exists at the destination (e.g., you are updating a backup), rsync only copies the parts of the file that have actually changed (the &amp;ldquo;delta&amp;rdquo;) rather than overwriting the entire file. cp, by contrast, always copies the whole file every single time.&lt;/li&gt;
&lt;li&gt;Real-time Progress Monitoring
rsync provides excellent visual feedback. By using the -P (or &amp;ndash;progress) flag, you get a real-time progress bar showing the percentage complete, transfer speed, and estimated time remaining. cp is famously silent, leaving you guessing whether the process is still running or has hung, requiring you to check at the destination via the size of the arriving file, whether anything is progressing (ls -lh filename, or du -hs filename)&lt;/li&gt;
&lt;li&gt;Seamless Remote Transfers
rsync is natively built to work over SSH. You can use it to copy files directly to or from a remote server as easily as copying files on your local machine. cp cannot do this; to use cp for a remote server, you would first need to mount the remote filesystem locally, which is far more complex and prone to errors.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is a common use case, the transfer of a directory, including all of its content:&lt;/p&gt;</description></item><item><title>BackupPC and Macs</title><link>https://jeltsch.org/en/backuppc_and_macs/</link><pubDate>Wed, 13 Apr 2016 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/backuppc_and_macs/</guid><description>&lt;p&gt;I myself have been using the backup software 
 &lt;a href="http://backuppc.sourceforge.net/" target="_blank" rel="noopener noreferrer nofollow"&gt;BackupPC&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 for almost a decade, and I started to backup our lab computers to a central backup server about two years ago. BackupPC supports deduplication and therefore much data can be stored on a couple of 2 TB drives.BackupPC supports many protocols (smb, ftp, tar/rsync via ssh), but we mostly use rsync via ssh. The data is not encrypted before the backup. Strangely not even the upcoming version 4 will support pre-egression encryption. However, we store the backup on an encrypted volume. That way it is at least protected if the backup server is stolen. And during transit, the data is protected by ssh. However, the system is not 
 &lt;a href="https://en.wikipedia.org/wiki/Trust_no_one_%28Internet_security%29" target="_blank" rel="noopener noreferrer nofollow"&gt;TNO&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 (&amp;ldquo;trust no-one&amp;rdquo;), since I (as the backupc administrator) can access the files. When using Linux, one feasible method would be to encrypt the user&amp;rsquo;s home directory using 
 &lt;a href="http://ecryptfs.org/" target="_blank" rel="noopener noreferrer nofollow"&gt;eCryptFS&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 (which is an inbuilt option when creating users on 
 &lt;a href="http://www.ubuntu.com/" target="_blank" rel="noopener noreferrer nofollow"&gt;Ubuntu&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
) and then backup the /home/.ecryptfs directory instead of the users home directory. However, recovery would be much more of a problem. You would be able to browse the diectory structure and files of the backup, but the filenames would be meaningless since they are also encrypted in the process.There is one peculiarity in backing up Mac OSX machines: BackupPC normally connects as root via ssh into the client computer and executes the rsync backup command. In order to make this possible on university-managed Mac OSX computers, we had to create a dedicated user (&amp;ldquo;backuppc&amp;rdquo;) on the client machines and allow for this user the execution of rsync with root privileges, which is done by adding this line in the /etc/sudoers file:&lt;code&gt;backuppc ALL=NOPASSWD: /usr/bin/rsync&lt;/code&gt;. Then we have to change the ssh/rsync command for the Mac client on the backuppc server changing &amp;ldquo;root&amp;rdquo; into &amp;ldquo;backuppc&amp;rdquo;.&lt;/p&gt;</description></item></channel></rss>