iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
The safest Linux backup is a timestamped archive created outside the live server directory, after Bedrock has finished saving the world and before the archive is verified. The script below discovers the world named by level-name, coordinates a save hold (or a controlled systemd stop), captures the world and server configuration, prunes old archives, and logs failures.
It targets the Ubuntu environment supported by Mojang and Microsoft: Ubuntu 22.04 LTS or later. Test a restore before treating any archive as reliable.
Requirements and server layout
Mojang’s current download guidance requires Ubuntu 22.04 LTS or later for the Linux Bedrock Dedicated Server. Microsoft’s getting-started documentation identifies Ubuntu as the supported Linux distribution family and starts the extracted server with LD_LIBRARY_PATH=. ./bedrock_server.
Run the backup as the same Linux account that owns the server files, or grant a dedicated backup service only the permissions it needs. A typical installation contains:
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
server.properties, includinglevel-name;worlds/<level-name>, the active world directory created on first run;behavior_packs/andresource_packs/for shared content;- JSON files such as
permissions.json,allowlist.json, andops.json, when used.
Do not hard-code a folder such as worlds/Bedrock level. The folder name is taken from level-name, which may contain spaces or change when a world is renamed.
Choose how the backup obtains a consistent snapshot
Pause saving with the Bedrock console
Bedrock supports the console sequence save hold, copy the files, then save resume. This keeps the process online, but your script must be able to send commands to the console session. The example below assumes the server runs in a GNU Screen session named bedrock. Change that name if yours differs.
Free tools Windows power users keep installed
One-click scans. No signup required.
Stop and restart through systemd
A controlled stop is easier to reason about when console access is unavailable. Stopping the service closes file handles before the archive is made, but players experience downtime. The script supports this mode with CONSISTENCY_MODE=stop and a systemd service name.
Never copy a live world without one of these controls. A file-by-file copy can capture different points in time and produce an archive that extracts successfully but cannot load as a world.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Install the backup script
Create /usr/local/sbin/bedrock-backup.sh and make it executable. Edit the variables at the top to match your installation. The archive directory must not be inside SERVER_DIR; otherwise a full server-disk failure can destroy both the live world and its backups.
#!/usr/bin/env bash
set -Eeuo pipefail
SERVER_DIR=/srv/minecraft-bedrock
BACKUP_DIR=/srv/minecraft-backups
RETENTION=7
LOCK_FILE=/run/lock/bedrock-backup.lock
CONSISTENCY_MODE=hold # hold or stop
SCREEN_NAME=bedrock # used only when CONSISTENCY_MODE=hold
SERVICE_NAME=minecraft-bedrock
mkdir -p "$BACKUP_DIR" "$(dirname "$LOCK_FILE")"
exec 9>"$LOCK_FILE"
flock -n 9 || { echo "Another backup is running" >&2; exit 1; }
PROPERTIES="$SERVER_DIR/server.properties"
[[ -r "$PROPERTIES" ]] || { echo "Missing $PROPERTIES" >&2; exit 1; }
WORLD_NAME=$(awk -F= '
/^[[:space:]]*level-name[[:space:]]*=/ {
sub(/r/, "", $2); gsub(/^[ t]+|[ t]+$/, "", $2); print $2; exit
}' "$PROPERTIES")
[[ -n "$WORLD_NAME" ]] || { echo "level-name is empty" >&2; exit 1; }
WORLD_REL="worlds/$WORLD_NAME"
[[ -d "$SERVER_DIR/$WORLD_REL" ]] || { echo "World not found: $SERVER_DIR/$WORLD_REL" >&2; exit 1; }
send_console() {
screen -S "$SCREEN_NAME" -X stuff "$1"$'n'
}
stopped=0
resume_needed=0
cleanup() {
rc=$?
if (( resume_needed )); then
send_console "save resume" || echo "Could not send save resume" >&2
fi
if [[ "$CONSISTENCY_MODE" == stop && $stopped -eq 1 ]]; then
systemctl start "$SERVICE_NAME" || rc=1
fi
exit "$rc"
}
trap cleanup EXIT INT TERM
case "$CONSISTENCY_MODE" in
hold)
command -v screen >/dev/null || { echo "screen is required for hold mode" >&2; exit 1; }
send_console "save hold"
resume_needed=1
sleep 2
;;
stop)
systemctl stop "$SERVICE_NAME"
stopped=1
;;
*) echo "CONSISTENCY_MODE must be hold or stop" >&2; exit 1 ;;
esac
stamp=$(date -u +%Y%m%dT%H%M%SZ)
tmp="$BACKUP_DIR/.bedrock-$stamp-$$.tar.gz"
archive="$BACKUP_DIR/bedrock-$stamp.tar.gz"
items=("$WORLD_REL" server.properties)
for item in permissions.json allowlist.json ops.json behavior_packs resource_packs; do
[[ -e "$SERVER_DIR/$item" ]] && items+=("$item")
done
tar -C "$SERVER_DIR" -czf "$tmp" "${items[@]}"
tar -tzf "$tmp" >/dev/null
chmod 600 "$tmp"
mv "$tmp" "$archive"
mapfile -t old_archives < <(find "$BACKUP_DIR" -maxdepth 1 -type f -name 'bedrock-*.tar.gz' -printf '%T@|%pn' | sort -nr)
for ((i=RETENTION; i<${#old_archives[@]}; i++)); do
rm -f -- "${old_archives[$i]#*|}"
done
echo "Created $archive for world '$WORLD_NAME'"
The cleanup trap is important: if tar fails, the script still attempts save resume or restarts the stopped service. The archive is first written with a temporary name, checked with tar -tzf, permissions are restricted to the owner, and only then is it renamed to its final timestamped name.
Configure the console session for hold mode
Start the server inside Screen, for example with a session named bedrock, and verify that screen -ls shows it. If the server is launched by a different supervisor, use stop mode instead of pretending that a Screen command succeeded. A failed console command must fail the backup rather than silently copying a live world.
Use stop mode when the service owns the process
Set CONSISTENCY_MODE=stop, set SERVICE_NAME to the actual unit, and ensure the account running the backup can invoke systemctl stop and systemctl start. Do not add a hard dependency that causes systemd to stop the game service before the backup service has begun; let the script perform the stop and restart in its cleanup path.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Schedule it with systemd
A systemd timer provides journal logs, failure status, and predictable ordering. Create /etc/systemd/system/bedrock-backup.service:
[Unit]
Description=Back up the Minecraft Bedrock world
After=local-fs.target
[Service]
Type=oneshot
User=minecraft
Group=minecraft
ExecStart=/usr/local/sbin/bedrock-backup.sh
Create /etc/systemd/system/bedrock-backup.timer:
[Unit]
Description=Nightly Minecraft Bedrock backup
[Timer]
OnCalendar=*-*-* 03:15:00
Persistent=true
RandomizedDelaySec=5m
[Install]
WantedBy=timers.target
Enable and test it:
sudo systemctl daemon-reload
sudo systemctl enable --now bedrock-backup.timer
sudo systemctl start bedrock-backup.service
sudo systemctl status bedrock-backup.service
sudo journalctl -u bedrock-backup.service -n 100 --no-pager
Choose a time with low player activity. Persistent=true runs a missed calendar event after the host returns, which is useful after maintenance but can create an unexpected backup immediately after boot.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use cron for a minimal installation
Cron is adequate when one server and one script are all you need. Edit the crontab for the account that owns the files:
15 3 * * * /usr/local/sbin/bedrock-backup.sh >> /var/log/bedrock-backup.log 2>&1
Keep the flock in the script even with cron. It prevents overlapping runs when an archive takes longer than a day’s interval or an administrator starts a manual backup.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Choose storage and retention deliberately
A second directory on the same disk protects against accidental deletion and a bad update, but not disk failure. Point BACKUP_DIR at a mounted external USB hard drive or SSD to separate the archive from the live volume. Mount it before the timer runs and make the backup account’s ownership and permissions explicit.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
For stronger disaster recovery, copy completed archives to an off-site system after local verification. The script does not encrypt or upload files automatically; add a separately tested transfer step only after confirming that the destination, credentials, and restore process work.
There is no universal retention number. Measure the compressed archive size, the world’s change rate, available storage, and how far back you may need to recover. A 2026-indexed tutorial keeps seven nightly archives; treat that as an example policy, not a guarantee or recommendation. A practical policy often combines several recent daily copies with less frequent weekly or monthly copies, provided the storage budget supports them.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Verify archives and perform a real restore
Listing an archive proves that gzip and tar can read it; only a test restore proves that the world can start. Perform a restore during maintenance, never over the only copy of a live world.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
- Stop the Bedrock service:
sudo systemctl stop minecraft-bedrock, or stop the process using the supervisor that normally launches it. - Copy the selected
bedrock-YYYYMMDDTHHMMSSZ.tar.gzto a temporary restore directory and runtar -tzfbefore extraction. - Extract it into a staging directory, inspect the resulting
worlds/<level-name>, and compareserver.propertieswith the current file. - Move the current world to a dated quarantine directory rather than deleting it. Copy the extracted world into
SERVER_DIR/worlds/; restore configuration and pack directories only when you intend to roll those files back too. - Set ownership and permissions to match the server account, then start the service.
- Join the server, check the spawn area, inventories, recent builds, behavior packs, and resource packs, and watch the service journal for errors.
Keep the quarantined pre-restore world until the restored server has been observed for at least one normal play session. A restore that starts but loses a pack, permission file, or recent progress is not a successful recovery.
Compare the main operating choices
| Decision | Option | Strength | Cost or risk |
|---|---|---|---|
| Consistency | save hold and resume |
Players remain connected and downtime is minimal. | Requires reliable console access and cleanup handling. |
| Consistency | Controlled systemd stop | Simple, deterministic file state. | Players are disconnected during every backup. |
| Scheduler | Cron | Few moving parts and easy manual editing. | Less visibility into status, logs, and dependencies. |
| Scheduler | systemd timer and service | Journal logs, exit status, missed-run behavior, and ordering. | More unit files to maintain. |
| Management tool | Bedrock Server Manager | Provides a management interface, scheduled tasks, automatic backups, pruning, and update handling. | Adds a third-party control layer and its own maintenance requirements. |
| Storage | Same disk | Fast and inexpensive. | Does not protect against disk failure. |
| Storage | External drive or off-site target | Separates recovery copies from the live host. | Requires mounting, transfer, access control, and periodic availability checks. |
Troubleshoot common failures
The script says the world is missing
Check level-name for whitespace, comments, or a renamed world, then confirm that SERVER_DIR/worlds/<value> exists. The script deliberately stops instead of archiving the wrong directory.
save hold does nothing
Confirm the Screen session name, that the backup account can access the session, and that the server was launched inside Screen. Review the backup log for a failed screen command. If your launcher does not expose a console, switch to controlled stop mode.
The timer runs but no archive appears
Read journalctl -u bedrock-backup.service, check that BACKUP_DIR is mounted and writable, and run the script manually as the configured service user. A full disk, missing pack directory handling, incorrect ownership, or a stale lock can all prevent completion.
The server will not start after a restore
Check ownership, free space, the extracted directory nesting, and whether level-name matches the restored world folder. Restore configuration files selectively; an incompatible or obsolete pack can prevent a previously working setup from loading.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick Recap
Operational checklist
- Keep the backup directory outside the live server tree.
- Use
save holdwith a verified console session or stop the service before copying. - Archive the active world,
server.properties, permissions and allowlist JSON files, and behavior/resource packs. - Use timestamped names, restrictive permissions, a lock, archive verification, and retention based on measured storage.
- Monitor timer or cron logs and alert on a non-zero exit status.
- Restore to a staging host or directory on a schedule you can sustain.
- Recheck Ubuntu and Bedrock requirements after server updates because release behavior and installation guidance can change.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

