<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Restoring an app from an rsync backup downloads everything again, even when almost all files are already there]]></title><description><![CDATA[<p dir="auto">This morning the Immich update to 1.102.3 broke machine learning (<a href="https://forum.cloudron.io/topic/16034/bug-immich-1.102.3-machine-learning-fails-to-start-libgl.so.1-missing">topic 16034</a>), so I restored the backup from just before the update. That brought back something I've raised before: backups are fast, restores are very slow.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Immich, sshfs + rsync to a Hetzner Storage Box</th>
<th>Files</th>
<th>Data</th>
<th>Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>Backup this morning (incremental)</td>
<td>151,807</td>
<td>1.1 GB transferred</td>
<td>55 s</td>
</tr>
<tr>
<td>Restore of the backup before the update</td>
<td>151,807</td>
<td>291 GB</td>
<td>~1.5 h</td>
</tr>
</tbody>
</table>
<p dir="auto">Almost all of those 291 GB were already on the server and unchanged. The restore first empties the data directory and then fetches every file again, one by one. During that time the app is down, and my phone can't upload photos.</p>
<p dir="auto">I understand the earlier answers: Cloudron's rsync format isn't real rsync, and most setups use object storage, where comparing with local files isn't straightforward (<a href="https://forum.cloudron.io/topic/13362/">13362</a>, <a href="https://forum.cloudron.io/topic/13499/">13499</a>). But in 13499 girish mentioned that backup integrity with checksums could make it possible to check whether local and remote files are "the same". That is now in place: every backup has a <code>.backupinfo</code> with a sha256 per file.</p>
<p dir="auto">What I have in mind is simple: don't empty the data directory, but sync the backup into it. Files whose size and sha256 match the <code>.backupinfo</code> stay where they are, only missing or changed files are downloaded, and files that aren't in the backup are removed. In this case that would have been the photos uploaded after the backup, a few changed thumbnails and the database dump, roughly the size of the incremental backup instead of 291 GB. For sshfs targets that support real rsync (a Hetzner Storage Box does), even plain <code>rsync -a --delete</code> from the snapshot would work. The obvious downside is that the restore then has to read and hash the local files first, but on a local disk that is far faster than fetching 150k files one by one.</p>
<p dir="auto">It matters even more for a full server restore. At this speed my largest server would take well over a day, while the incremental backups take minutes. I've also followed the sshfs read-speed discussion (<a href="https://forum.cloudron.io/topic/13852/">13852</a>).</p>
<p dir="auto">Is something like this possible now that the integrity data is there, at least for the rsync format?</p>
]]></description><link>https://forum.cloudron.io/topic/16035/restoring-an-app-from-an-rsync-backup-downloads-everything-again-even-when-almost-all-files-are-already-there</link><generator>RSS for Node</generator><lastBuildDate>Sun, 04 Oct 2026 17:11:56 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/16035.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 30 Sep 2026 11:14:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Restoring an app from an rsync backup downloads everything again, even when almost all files are already there on Wed, 30 Sep 2026 13:03:39 GMT]]></title><description><![CDATA[<p dir="auto">Thanks! One data point from today's restore: the time was driven by the number of files, not their size. The ~100k small thumbnails took most of it, since every file costs a round trip over sshfs, so skipping unchanged small files would help just as much. A quick size + mtime check before hashing would probably keep the CPU side cheap too.</p>
]]></description><link>https://forum.cloudron.io/post/130231</link><guid isPermaLink="true">https://forum.cloudron.io/post/130231</guid><dc:creator><![CDATA[imc67]]></dc:creator><pubDate>Wed, 30 Sep 2026 13:03:39 GMT</pubDate></item><item><title><![CDATA[Reply to Restoring an app from an rsync backup downloads everything again, even when almost all files are already there on Wed, 30 Sep 2026 12:31:05 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the reminder! Forgot about this. Yeah, so an idea would be to hash the file locally and only download if something changed. There is a CPU vs network optimization. So, it might make sense for large files and avoid re-downloading then again.</p>
]]></description><link>https://forum.cloudron.io/post/130226</link><guid isPermaLink="true">https://forum.cloudron.io/post/130226</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 30 Sep 2026 12:31:05 GMT</pubDate></item></channel></rss>