Problem Description
Linux server backups are reporting an unusually massive size, sometimes as large as 128 TB. However, the actual amount of data on server's disks is much smaller. A review of the backup logs indicates that the /proc/kcore
file is being included in the backup process.
Cause
The issue stems from how backup software interacts with Linux's virtual file systems. The backup proxy scans all readable files, including those in the
/proc
directory.The
/proc
directory doesn't contain real files. Instead, it's a virtual window into the kernel and system memory.A key file here is
/proc/kcore
, which is a live image of your computer's physical memory (RAM). While it doesn't take up any disk space, it reports its size as the total amount of system memory, which can be enormous (e.g., 128 TB on systems with large address spaces).When the backup software scans this virtual file, it mistakenly adds its massive reported size to the total backup size, leading to the inflated numbers.
Solution
To resolve this, we need to identify the problematic file and then exclude its parent directory from the backup job.
1. Verify the Issue
Run the following command on the affected Linux server to list the contents of the
/proc
directory:find /proc -type f | xargs ls -ltr
(Note: You may see "No such file or directory" errors. This is normal, as files in
/proc
are created and destroyed on the fly.)Check the command's output for
/proc/kcore
and notice its exceptionally large size.Example:
-r-------- 1 root root 140737471594496 Jun 3 07:19 /proc/kcore
2. Exclude Virtual Directories
In your backup software's configuration, add exclusions for the following virtual system directories:
/proc
/sys
3. Rerun the Backup
After saving the new configuration with the exclusions, run the backup job again.
The reported backup size should now accurately reflect the actual data on your server's disks.