rrgreene
Sorry, but I can’t replicate your issue. The size difference you’re seeing isn’t expected, and I’m not sure what’s going wrong in your setup.
To help troubleshoot, try this modified version of the script, which allows you to back up only specific sites instead of everything. This might help narrow down where the issue is occurring:
https://gist.github.com/cPFence/56c523f81f2ae7cd5dad3a31e7146815
Just add your target site IDs in the TARGET_SITES
variable to back up only those specific sites. Once the backup is completed, compare the size of the test site on both servers using:
btrfs filesystem du -s /backups/YOUR_SITE_ID/
Example output from our test servers below.
The source server:
root@testsrv3:~# btrfs filesystem du -s /backups/4dc46ca7-db66-40cb-8d71-f593bc8c0ce3/
Total Exclusive Set shared Filename
8.15GiB 66.48MiB 292.62MiB /backups/4dc46ca7-db66-40cb-8d71-f593bc8c0ce3/
The destination server:
root@testsrv4:~# btrfs filesystem du -s /backups/4dc46ca7-db66-40cb-8d71-f593bc8c0ce3/
Total Exclusive Set shared Filename
8.29GiB 8.29GiB 0.00B /backups/4dc46ca7-db66-40cb-8d71-f593bc8c0ce3/
As you can see, there’s a small difference in total size, but that’s expected. If your backup size is way bigger, there seems to be an issue with your process. I'm not sure what it is. Try this test and see what you get.