How to investigate disk usage growth with v-df-snapshot-diff
Posted: Fri Apr 24, 2026 5:03 pm
This guide explains how to investigate why disk usage increased on a myVesta server by comparing two disk usage snapshots.
The command used for this is:
It compares two saved disk usage snapshots and shows which folders grew or decreased between those two points in time.
Typical use case
A client reports that available disk space decreased significantly, for example:
Example command
Example output:
The command creates three output files:
Example result
In this case, the first lines of the size-sorted diff showed:
This means that the largest increase happened inside:
The folder increased by approximately:
That is around 45 GB.
Important note about reading the output
The numbers in the output are shown in MB.
Positive numbers mean that the folder increased in size.
Example:
This means that the folder increased by approximately 45 GB.
Negative numbers mean that the folder decreased in size.
Example:
This means that these folders became smaller compared to the older snapshot.
Short usage mode
The command can also be used with snapshot indexes instead of full file paths.
Example:
This compares the second latest snapshot with the latest snapshot.
Example output:
This is useful when you want to quickly compare recent daily changes.
Useful examples
Compare yesterday with today:
Compare an older snapshot with the latest one:
Compare two exact snapshot files:
Open the result sorted by largest growth:
How to create a very fresh snapshot and see a difference between it and the latest created snapshot?
The latest snapshot is usually created around 04 AM that day.
So, this command will create a new snapshot when you run it and compare it with the snapshot from 04 AM that day.
Keep in mind that if you run that command again on the same day, then the latest snapshot will not be a snapshot from 04 AM, but the snapshot from the last time you ran that command that day.
Basically, this command is just a 'shortcut' for:
('2 1' means compare the second latest with the first latest)
How to see the list of all snapshots?
Finding the real cause
After identifying the folder that grew the most, inspect that folder manually.
Example:
In this case, the investigation showed a very large WordPress debug log file:
The file size was:
That is approximately 126 GB.
This means that the disk space issue was not caused by new products or uploaded media, but by a huge WordPress debug log file.
Example screenshot result
Inside the WordPress wp-content directory, the following file was found:
This clearly showed that the main reason for disk usage growth was the WordPress debug log.
Common causes of huge debug.log files
A very large WordPress debug.log file usually means that WordPress debug logging is enabled and that some plugin, theme, or custom code is repeatedly generating PHP warnings, notices, deprecated messages, or fatal errors.
Common causes include:
First check whether WordPress debug logging is enabled in wp-config.php:
Typical production-safe values are:
If debug logging is enabled, disable it unless the developer explicitly needs it.
Then rotate, truncate, or remove the huge debug.log file.
To truncate the file safely without deleting it:
Or remove it:
After that, monitor whether the file starts growing again:
If it grows again quickly, inspect the latest log entries:
Example client explanation
A short client-friendly explanation can look like this:
The command v-df-snapshot-diff is useful for quickly identifying which folders caused disk usage growth between two dates.
The usual workflow is:
The command used for this is:
Code: Select all
v-df-snapshot-diff
Typical use case
A client reports that available disk space decreased significantly, for example:
In this situation, we can compare the disk usage snapshot from one month ago with the latest snapshot.Can you tell us what happened? Disk space decreased by around 20 GB in one month, but we did not add new products or new content to the website.
Example command
Code: Select all
v-df-snapshot-diff /usr/local/vesta/data/df/snapshot-2026-03-24-04-05-01.txt /usr/local/vesta/data/df/snapshot-2026-04-24-04-05-01.txt
Code: Select all
Comparing file1: /usr/local/vesta/data/df/snapshot-2026-03-24-04-05-01.txt
Comparing file2: /usr/local/vesta/data/df/snapshot-2026-04-24-04-05-01.txt
--------------------------------
Done.
You can do:
mcview /usr/local/vesta/data/df-diff/diff-2026-04-24-15-59-58.txt
mcview /usr/local/vesta/data/df-diff/diff-size-sorted-2026-04-24-15-59-58.txt
mcview /usr/local/vesta/data/df-diff/diff-folder-sorted-2026-04-24-15-59-58.txt
- diff-YYYY-MM-DD-HH-MM-SS.txt - raw diff output
- diff-size-sorted-YYYY-MM-DD-HH-MM-SS.txt - diff sorted by size, descending
- diff-folder-sorted-YYYY-MM-DD-HH-MM-SS.txt - diff sorted by folder path
Code: Select all
mcview /usr/local/vesta/data/df-diff/diff-size-sorted-YYYY-MM-DD-HH-MM-SS.txt
In this case, the first lines of the size-sorted diff showed:
Code: Select all
49181 /
48821 /home/exampleuser
48821 /home
48634 /home/exampleuser/web/example.com
48634 /home/exampleuser/web
45784 /home/exampleuser/web/example.com/public_html
45304 /home/exampleuser/web/example.com/public_html/wp-content
3729 /var
3209 /var/lib/mysql
2774 /home/exampleuser/web/example.com/_REMOTE_EXTRACT_TXT_
776 /var/lib/mysql/exampleuser_exampledb
520 /var/log
439 /var/log/apache2
260 /home/exampleuser/web/example.com/public_html/images
245 /home/exampleuser/web/example.com/public_html/wp-content/cache
220 /home/exampleuser/web/example.com/public_html/FILE_LOG
20 /home/exampleuser/web/example.com/public_html/wp-content/uploads
Code: Select all
/home/exampleuser/web/example.com/public_html/wp-content
Code: Select all
45304 MB
Important note about reading the output
The numbers in the output are shown in MB.
Positive numbers mean that the folder increased in size.
Example:
Code: Select all
45304 /home/exampleuser/web/example.com/public_html/wp-content
Negative numbers mean that the folder decreased in size.
Example:
Code: Select all
/baze -701
/baze-arhiva -2630
Short usage mode
The command can also be used with snapshot indexes instead of full file paths.
Example:
Code: Select all
v-df-snapshot-diff 2 1
Example output:
Code: Select all
Comparing file1: /usr/local/vesta/data/df/snapshot-2026-04-23-04-05-02.txt
Comparing file2: /usr/local/vesta/data/df/snapshot-2026-04-24-04-05-01.txt
Useful examples
Compare yesterday with today:
Code: Select all
v-df-snapshot-diff 2 1
Code: Select all
v-df-snapshot-diff 30 1
Code: Select all
v-df-snapshot-diff /usr/local/vesta/data/df/snapshot-2026-03-24-04-05-01.txt /usr/local/vesta/data/df/snapshot-2026-04-24-04-05-01.txt
Code: Select all
mcview /usr/local/vesta/data/df-diff/diff-size-sorted-YYYY-MM-DD-HH-MM-SS.txt
How to create a very fresh snapshot and see a difference between it and the latest created snapshot?
Code: Select all
v-df-snapshot-make-and-diffSo, this command will create a new snapshot when you run it and compare it with the snapshot from 04 AM that day.
Keep in mind that if you run that command again on the same day, then the latest snapshot will not be a snapshot from 04 AM, but the snapshot from the last time you ran that command that day.
Basically, this command is just a 'shortcut' for:
Code: Select all
v-df-snapshot-make
v-df-snapshot-diff 2 1How to see the list of all snapshots?
Code: Select all
ls -lt /usr/local/vesta/data/df/Finding the real cause
After identifying the folder that grew the most, inspect that folder manually.
Example:
Code: Select all
cd /home/exampleuser/web/example.com/public_html/wp-content
du -sh * .[^.]* 2>/dev/null | sort -h
Code: Select all
/home/exampleuser/web/example.com/public_html/wp-content/debug.log
Code: Select all
126590M
This means that the disk space issue was not caused by new products or uploaded media, but by a huge WordPress debug log file.
Example screenshot result
Inside the WordPress wp-content directory, the following file was found:
Code: Select all
debug.log 126590M
Common causes of huge debug.log files
A very large WordPress debug.log file usually means that WordPress debug logging is enabled and that some plugin, theme, or custom code is repeatedly generating PHP warnings, notices, deprecated messages, or fatal errors.
Common causes include:
- WordPress debugging left enabled on a production website
- A plugin generating repeated PHP warnings
- A theme function causing repeated errors
- WooCommerce or another large plugin producing repeated logs
- Cron jobs triggering the same PHP error again and again
- Bot traffic repeatedly hitting a problematic endpoint
First check whether WordPress debug logging is enabled in wp-config.php:
Code: Select all
grep -n "WP_DEBUG\|WP_DEBUG_LOG\|WP_DEBUG_DISPLAY" /home/exampleuser/web/example.com/public_html/wp-config.php
Code: Select all
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', false);
define('WP_DEBUG_DISPLAY', false);
Then rotate, truncate, or remove the huge debug.log file.
To truncate the file safely without deleting it:
Code: Select all
truncate -s 0 /home/exampleuser/web/example.com/public_html/wp-content/debug.log
Code: Select all
rm /home/exampleuser/web/example.com/public_html/wp-content/debug.log
Code: Select all
watch -n 5 'ls -lh /home/exampleuser/web/example.com/public_html/wp-content/debug.log 2>/dev/null'
Code: Select all
tail -n 100 /home/exampleuser/web/example.com/public_html/wp-content/debug.log
Example client explanation
A short client-friendly explanation can look like this:
SummaryWe compared the disk usage snapshot from one month ago with the latest snapshot.
The largest growth was detected inside the WordPress wp-content folder:
45304 MB /home/exampleuser/web/example.com/public_html/wp-content
After checking that folder, we found that the file wp-content/debug.log had grown to approximately 126 GB.
This means that the disk usage increase was not caused by new products or uploaded media, but by a WordPress debug log file. Such files usually grow when WordPress debug logging is enabled and some plugin, theme, or custom code repeatedly generates PHP warnings or errors.
We recommend disabling WordPress debug logging on the production website and checking the latest entries in debug.log to identify what is generating the errors.
The command v-df-snapshot-diff is useful for quickly identifying which folders caused disk usage growth between two dates.
The usual workflow is:
- Compare two snapshots with v-df-snapshot-diff
- Open the size-sorted diff file
- Find the folder with the largest positive growth
- Inspect that folder with du, ls, or mc
- Identify the exact file or directory causing the increase
- Take action, for example clean logs, disable debug mode, remove temporary files, or investigate application errors