How to compress and extract files on your server
Uploading a world, a plugin pack or a website means moving a lot of files. Sending thousands of small files one by one is slow and error-prone, while a single archive is quick and reliable. Knowing how to compress and extract archives, in the file manager and on the command line, saves a great deal of time and makes backups and migrations easy.
Why use archives
- Speed. One file transfers far faster than thousands of small ones, because each file has overhead.
- Integrity. An archive either extracts completely or reports an error, rather than leaving a half-copied folder.
- Size. Compression shrinks text, logs and configs a lot, and world data a little.
- Convenience. You can move a whole project in one step, or keep a snapshot before a risky change.
Common formats
| Format | Extension | Notes |
|---|---|---|
| ZIP | .zip | Works everywhere, including Windows. Best for sharing |
| tar.gz | .tar.gz, .tgz | Standard on Linux. Keeps permissions and ownership |
| tar.xz | .tar.xz | Smaller, but slower to create |
| 7z | .7z | Very good compression, needs extra software |
| gz | .gz | Compresses a single file only |
For moving between Windows and a server, ZIP is the simplest. For Linux to Linux, especially when file permissions matter, use tar.gz.
In the file manager
Most panels' file managers let you select files or folders and choose archive or compress. They also offer an extract option on archive files. The general steps:
- Stop the server if you are archiving a live world, so files are not changing mid-copy.
- Select the folder, choose the compress option and give it a name.
- Wait for it to finish. Large worlds can take a minute or more.
- Download the archive through the browser, or via SFTP.
- To extract, select the archive and choose extract, then pick the destination.
Use the file manager walks through the panel tools, and Connect with SFTP covers large transfers, which are more reliable than a browser download.
Uploading an archive and extracting it
For a big upload, send one ZIP through SFTP, then extract it on the server. This is much faster than uploading a folder of thousands of files. For a world, make sure the archive structure is right: the world's files should end up in the folder the server expects, not inside an extra nested folder. See Upload a Minecraft world.
On the command line (Linux)
Create archives:
zip -r backup.zip world/
tar -czf backup.tar.gz world/
Extract them:
unzip backup.zip
tar -xzf backup.tar.gz
tar -xzf backup.tar.gz -C /path/to/destination
Look inside without extracting:
unzip -l backup.zip
tar -tzf backup.tar.gz
If zip or unzip are missing, install them with your package manager (sudo apt install zip unzip on Ubuntu).
Useful flags for tar: -c create, -x extract, -z use gzip, -f name the file, -v verbose, -C change directory. Remember that -f must be followed by the file name.
On Windows and macOS
Windows can create and open ZIP files by right-clicking a folder and choosing to compress it. For .7z or .tar.gz, use a free tool such as 7-Zip. macOS has a built-in compress option and the Terminal supports the tar commands above. Be aware that macOS and some tools add hidden files such as __MACOSX or .DS_Store, which are harmless but can clutter a world folder.
Pitfalls to avoid
- Archiving a running server. Files may change while copying, producing a corrupt snapshot. Stop it, or use the panel's backup tool, which handles this. See Creating and restoring backups.
- Extracting over existing files can mix old and new data. Extract into a clean folder, then swap.
- Zip bombs and unknown archives. Only extract archives from sources you trust. An archive can contain thousands of files or enormous expanded content. Never run programs found inside one without checking them. See Spot phishing and fake support messages.
- Wrong character encoding in file names, which can garble non-English names.
- Nested folders. Check where files landed after extracting.
- Running out of disk space. You need room for both the archive and the extracted files. See Fixing "No space left on device".
- Permissions lost in ZIP files. If files become unexecutable, use tar or fix modes. See Fix "Permission denied" errors.
Verifying an archive
After creating a big archive, test it:
unzip -t backup.zip
tar -tzf backup.tar.gz > /dev/null
No output or errors means the file is readable. For critical backups, compare checksums before and after transfer:
sha256sum backup.tar.gz
If the sums match on both sides, the transfer was exact.
A good habit
Before making a risky change, such as updating a version or editing many configs, compress the folder with a dated name, for example world-2026-10-22.zip, and download a copy. It takes a minute and can save hours. Pair it with the plan in The 3-2-1 backup rule.
Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.