How can I compare a large local website with its server copy?

November 19, 2026 4 answers
Asked by QuillDock-4n

I have a static photo site with about 169,000 files locally and 168,000 on the server. Windows reports roughly 49 GB locally, while the hosting file manager reports about 21 GB.

Most images are already compressed JPEGs. How can I find missing or different files without checking thousands of folders by hand?

Answers

8f!gasketvisor_527

With SSH access, rsync is a good place to start. Run it from a shell that can access your local files, using the local site directory as the source and the matching server directory as the destination. Use a dry run with -avn and --itemize-changes so it reports changes without transferring files.

By default, rsync checks size and modification time. If uploads did not preserve timestamps, --size-only can make the output easier to read. That will not catch files with the same size but different content.

Start without --delete. A dry run can also report server-only files if you add it, but leaving that option in a later live command could remove files from the destination. Check the paths and output carefully before running anything without the dry-run flag.

QuillDock-4n:

Does itemizing need a separate -i option?

7t+claspbadger_462:

Yes, -i is the short form of --itemize-changes. Either one is enough.

Reply to this answer
5r~plovergauge_827

First check what those two size numbers actually represent. Apparent file size and disk space allocated can differ, and the hosting file manager may not calculate its total the same way Windows does. Check the properties of the local folder and use du on the server, making sure both measurements cover the same site directory.

Also treat the file-count gap and the size gap as separate clues. A small difference in counts does not tell you which files are responsible for the size difference. A disk usage tool such as WizTree locally or ncdu on the server can help you spot large directories before you dig into individual files.

q.452~mivquaro:

For a storage quota, check the host's documentation or ask support what it counts. The displayed folder total and the quota calculation are not necessarily the same thing.

Reply to this answer
_z64+ferraviko.3

You can also export a recursive list of relative paths and file sizes from each side, sort the lists, and compare them. With a shell on the server, find can generate the server list. Use the same starting directory on both sides so the paths line up.

That gives you a useful inventory without downloading the whole site. Look for local-only paths, server-only paths, and matching paths with different sizes. Large originals, duplicates, caches, or files such as Thumbs.db are things worth checking, but the lists should tell you whether any of them actually account for the discrepancy.

Reply to this answer
Tavrixa+4n

No SSH? A comparison tool may be less hassle. WinSCP can compare directories, and rclone can connect to an FTP server and check files against a local folder. A size-only check is a useful first pass, though equal sizes do not prove the contents match.

Another option is to download the server copy into a separate folder and compare the two local directories with a tool such as Beyond Compare. That costs more time and disk space, but avoids changing the live site.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions