Fix XUI.ONE Backup System
Learn how to fix the XUI.one backup bug using a clean permission script without modifying core files. Safe, fast and fully compatible with all XUI.one versions.

📘 Overview
This guide explains the real cause of the XUI.ONE backup failure and provides a clean, native fix that restores full backup and restore functionality. No core files are edited.
📌 What Is the XUI.ONE Backup Issue?
XUI.ONE includes built‑in backup and restore features, but the automatic backup system fails silently.
❗ Why?
The PHP backup logic works. The real issue comes from the installer, which does not grant proper MySQL access permissions for:
- localhost
- 127.0.0.1
- ::1 (IPv6)
Because of this, backup tasks fail due to insufficient database access.
🔐 Why Backups Matter
- 💾 Protect your entire IPTV system
- 💡 Required for server migrations
- 🔄 Critical for recovery after failures
- ⚙️ Supports automated safe restore
A working backup system is essential for every IPTV panel.
🧪 Reverse Engineering the Issue
To understand the problem we decoded and examined:
/home/xui/www/admin/backups.php
/home/xui/crons/backups.php
The admin file was irrelevant. All backup logic runs inside:
crons/backups.php
After decoding and testing the file:
- No bugs were found
- All logic works correctly
The only problem was missing database permissions.

⚙️ Step 1: Download and Install the Backup Fix Script
Run this command to install the official IPTVTools backup fix:
This script adds correct MySQL permissions for localhost, 127.0.0.1 and ::1 automatically.
You now have a fully functional native backup system.
🧩 Developer Version of backups.php
If you want to inspect or modify the decoded backup source file, download it here:
This file is provided for educational and development purposes.
This script adds correct MySQL permissions for the XUI user on all local interfaces.
What the fix does:
- Grants MySQL access to localhost, 127.0.0.1 and ::1
- Restores full backup and restore capability instantly
- Does not modify XUI core files
- Open-source and verifiable
📥 Get the Cleaned Source Code (Optional)
If you want to inspect or extend backups.php, download the decoded source.
Possible extensions you can build:
- 📤 Cloud backup upload
- 📲 Telegram notifications
- 🔁 Custom retention logic
🧩 Step 2: Manual Execution (Optional)
You may execute the fixed backup script manually to test functionality.
(Commands shown only for Premium members.)
🧠 Conclusion
The XUI.ONE backup system was never broken. It was simply misconfigured by the installer.
With corrected MySQL permissions, backups run flawlessly without touching core files.
📌 Final Note
Always keep regular backups.
They protect your service, your clients and your entire IPTV ecosystem.
IPTVTools remains committed to delivering trusted tools, fixes and documentation to improve your workflow.