<?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[Use `gdu` instead of `du` (was "Exlude du from backup check")]]></title><description><![CDATA[<p dir="auto">Hey there,</p>
<p dir="auto">Can I set Cloudron Backup to skip</p>
<pre><code>shell: backuptask: du --dereference-args --summarize --block-size=1 --exclude=*.lock --exclude=dovecot.list.index.log.* /home/yellowtent/appsdata/c5d30482-9837-4fdb-8c21-04ef653d691c
</code></pre>
<p dir="auto">?</p>
<p dir="auto">It wastes 20 minutes on my Mastodon backup each night. And my S3 won't run out of space any time soon...</p>
]]></description><link>https://forum.cloudron.io/topic/15822/use-gdu-instead-of-du-was-exlude-du-from-backup-check</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 04:45:00 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15822.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 Aug 2026 20:01:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 16:36:28 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nichu42" aria-label="Profile: nichu42">@<bdi>nichu42</bdi></a> <a href="/post/128129">said</a>:</p>
<p dir="auto">I have an 8 Core Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz VPS.<br />
My Mastodon app data directory has ~ 450,000 files.</p>
</blockquote>
<p dir="auto">FYI my <code>yellowtent</code> folder has ~ 250.000 files on an SSD - just to give you perspective on the benchmarks.</p>
]]></description><link>https://forum.cloudron.io/post/128133</link><guid isPermaLink="true">https://forum.cloudron.io/post/128133</guid><dc:creator><![CDATA[necrevistonnezr]]></dc:creator><pubDate>Thu, 13 Aug 2026 16:36:28 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 15:32:05 GMT]]></title><description><![CDATA[<p dir="auto">I have moved it to feature request section and adjusted the title now</p>
]]></description><link>https://forum.cloudron.io/post/128132</link><guid isPermaLink="true">https://forum.cloudron.io/post/128132</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Thu, 13 Aug 2026 15:32:05 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 15:09:42 GMT]]></title><description><![CDATA[<p dir="auto">1 day would be good for me, but most of my users log in once a week, so I cut it down to 7 days.<br />
I have also resumed my project of moving to S3, and I think I have everything ready now. I am currently waiting for my user's browser caches to catch up with the new CSP, so images won't break when I do the switch.</p>
<p dir="auto">But changing to gdu as suggested by <a class="plugin-mentions-user plugin-mentions-a" href="/user/necrevistonnezr" aria-label="Profile: necrevistonnezr">@<bdi>necrevistonnezr</bdi></a> seems to be a good idea anyway.</p>
]]></description><link>https://forum.cloudron.io/post/128131</link><guid isPermaLink="true">https://forum.cloudron.io/post/128131</guid><dc:creator><![CDATA[nichu42]]></dc:creator><pubDate>Thu, 13 Aug 2026 15:09:42 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 14:32:24 GMT]]></title><description><![CDATA[<p dir="auto">woah that is a lot of files! But I have also seen my personal instance growing the file count a lot. I have set the cache retention days to 1 without noticable issues, it may have to refetch from the federated instance a bit more often if those posts do come up. Maybe this can help your instance also with file counts <a href="https://docs.cloudron.io/packages/mastodon#cache-retention-days" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/packages/mastodon#cache-retention-days</a></p>
]]></description><link>https://forum.cloudron.io/post/128130</link><guid isPermaLink="true">https://forum.cloudron.io/post/128130</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Thu, 13 Aug 2026 14:32:24 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 14:26:30 GMT]]></title><description><![CDATA[<p dir="auto">I have an 8 Core Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz VPS.<br />
My Mastodon app data directory has ~ 450,000 files.</p>
]]></description><link>https://forum.cloudron.io/post/128129</link><guid isPermaLink="true">https://forum.cloudron.io/post/128129</guid><dc:creator><![CDATA[nichu42]]></dc:creator><pubDate>Thu, 13 Aug 2026 14:26:30 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 06:00:36 GMT]]></title><description><![CDATA[<p dir="auto">Just tested on my machine: When not excluding <em>anything</em> (i.e. including maildir to simulate a folder with hundreds of thousands of files):</p>
<p dir="auto">du</p>
<pre><code>time (du -h --dereference-args --summarize --block-size=1 /home/yellowtent/ | sort -hr) 

„Warm Cache“:
real  0m0,617s
user  0m0,139s
sys   0m0,482s

After reboot (to simulate cold cache):
real  0m12,146s
user  0m0,347s
sys   0m1,733s
</code></pre>
<p dir="auto">gdu</p>
<pre><code>time (gdu -ns -a --no-prefix -L -I /home/yellowtent/ | awk '{print $1"\t"$2}')

„Warm cache“:
real  0m0,239s
user  0m0,391s
sys   0m0,372s

After reboot (to simulate cold cache):
real  0m2,844s
user  0m0,729s
sys   0m1,652s
</code></pre>
]]></description><link>https://forum.cloudron.io/post/128113</link><guid isPermaLink="true">https://forum.cloudron.io/post/128113</guid><dc:creator><![CDATA[necrevistonnezr]]></dc:creator><pubDate>Thu, 13 Aug 2026 06:00:36 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Thu, 13 Aug 2026 05:39:26 GMT]]></title><description><![CDATA[<p dir="auto">GNU <code>du</code> is <a href="https://github.com/sharkdp/diskus" target="_blank" rel="noopener noreferrer nofollow ugc">single-threaded</a> leading to stalls on scanning hundreds of thousands of files.</p>
<h5>Multi-threaded Alternatives:</h5>
<ul>
<li><code>gdu</code> (in repositories): Go-based, multi-threaded.</li>
<li><code>diskus</code> (Rust, <a href="https://github.com/sharkdp/diskus" target="_blank" rel="noopener noreferrer nofollow ugc">GitHub</a>) : Minimalist CLI total-size calculator.</li>
</ul>
<h5>Disk Usage Benchmark Comparison</h5>
<p dir="auto">Dataset: ~400,000 small files across 100,000 directories (~15 GB on NVMe SSD, 8-Core CPU)</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Tool</th>
<th>Cold Cache Execution</th>
<th>Warm Cache Execution</th>
<th>Architecture</th>
<th>Source</th>
</tr>
</thead>
<tbody>
<tr>
<td>gdu</td>
<td>~2.10 s (~1.2x vs diskus)</td>
<td>~500 ms (On par)</td>
<td>Go (Parallel Goroutines, SSD-optimized)</td>
<td>dundee/gdu GitHub Benchmarks</td>
</tr>
<tr>
<td>du -sh (GNU)</td>
<td>17.78 s (~10x slower)</td>
<td>1098 ms (~2.2x slower)</td>
<td>C (Single-threaded coreutils)</td>
<td>GNU Coreutils du.c</td>
</tr>
<tr>
<td>diskus</td>
<td>1.75 s (Baseline)</td>
<td>~500 ms (Baseline)</td>
<td>Rust (Parallel crossbeam traversal)</td>
<td>sharkdp/diskus GitHub Benchmark</td>
</tr>
</tbody>
</table>
<p dir="auto">On non-cached disks (e.g., night-time cron tasks), multi-threaded tools (gdu, diskus) bypass the stat() I/O latency bottleneck by querying drive metadata across all CPU threads concurrently.</p>
<h5>NOT a full drop-In Replacement for Scripts</h5>
<p dir="auto">Command Comparison<br />
Original GNU <code>du</code></p>
<pre><code>du --dereference-args --summarize --block-size=1 --exclude=*.lock --exclude=dovecot.list.index.log.* /home/yellowtent/
</code></pre>
<p dir="auto">Script-Compatible <code>gdu</code> Drop-In</p>
<pre><code>gdu -ns -a --no-prefix -L -I ".*\.lock,dovecot\.list\.index\.log.*" /home/yellowtent/ | awk '{print $1"\t"$2}'
</code></pre>
<h6>Flag Mapping</h6>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>GNU du</th>
<th>gdu Equivalent</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>-s, --summarize</td>
<td>-s</td>
<td>Output total size only</td>
</tr>
<tr>
<td>--block-size=1</td>
<td>-a --no-prefix</td>
<td>Raw byte count (no unit suffix)</td>
</tr>
<tr>
<td>-D, --dereference-args</td>
<td>-L</td>
<td>Follow symlinks</td>
</tr>
<tr>
<td>--exclude=A --exclude=B</td>
<td>-I "A,B"</td>
<td>Comma-separated exclude patterns</td>
</tr>
<tr>
<td>N/A</td>
<td>-n</td>
<td>Non-interactive mode (disables TUI)</td>
</tr>
</tbody>
</table>
<h6>Key Caveats</h6>
<ul>
<li>Delimiter (Tab vs. Space): GNU du separates bytes and path with <code>\t</code>. gdu uses spaces. Piping to awk <code>'{print $1"\t"$2}'</code> prevents broken cut -f1 parsers in scripts.</li>
<li>Symlink Scope: GNU <code>du --dereference-args</code> resolves symlinks only at the root level. <code>gdu -L</code> resolves all internal symlinks recursively, which can inflate total calculated sizes.</li>
<li>Exit Codes: <code>gdu -n</code> silently skips unreadable files and exits 0. GNU du exits 1 on permission errors, which backup scripts often monitor.</li>
</ul>
]]></description><link>https://forum.cloudron.io/post/128112</link><guid isPermaLink="true">https://forum.cloudron.io/post/128112</guid><dc:creator><![CDATA[necrevistonnezr]]></dc:creator><pubDate>Thu, 13 Aug 2026 05:39:26 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Wed, 12 Aug 2026 17:31:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nebulon" aria-label="Profile: nebulon">@<bdi>nebulon</bdi></a> I guess because my public Mastodon instance has hundreds of thousands of small files.</p>
]]></description><link>https://forum.cloudron.io/post/128106</link><guid isPermaLink="true">https://forum.cloudron.io/post/128106</guid><dc:creator><![CDATA[nichu42]]></dc:creator><pubDate>Wed, 12 Aug 2026 17:31:52 GMT</pubDate></item><item><title><![CDATA[Reply to Use `gdu` instead of `du` (was "Exlude du from backup check") on Wed, 12 Aug 2026 14:16:22 GMT]]></title><description><![CDATA[<p dir="auto">Disabling this is not really possible or exposed as some setting. Once question though is, why does it take so long to just calculate the size of the folder to estimate the backup size?</p>
]]></description><link>https://forum.cloudron.io/post/128099</link><guid isPermaLink="true">https://forum.cloudron.io/post/128099</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Wed, 12 Aug 2026 14:16:22 GMT</pubDate></item></channel></rss>