Repository navigation
Releases
v5.0.5
Marzban migration now asks which database to restore when the backup holds a SQLite file and a SQL dump with different user counts (default after 15 min: the engine declared in .env). Includes the MariaDB dump staging fixes from 5.0.4.
v5.0.4
Fix MariaDB dump import failing with ERROR 1826 (duplicate FK constraint name): FK names are de-duplicated, MariaDB dumps are auto-detected and staged with mariadb:11 even when .env says mysql, and staging retries once with the other engine on failure.
v5.0.3
Fix restore stuck at 40% on the PgBouncer auth probe: psql now runs inside the DB container (no image pull), host-TCP fallback only uses locally present images, and a failed probe no longer stalls the restore.
v5.0.2
v5.0.2
Fix: Marzban backups made by marzban.sh backup (tar.gz, sent to Telegram as backup_part_aa.tar.gz) stayed stuck at Continue in the migration wizard, especially on servers moved from SQLite to MariaDB that still carry the old db.sqlite3. (#199)
- The migration upload accepts tar.gz / tgz / tar backups, detected by content, so a tar.gz renamed to
.zipor re-zipped also works - A zip that only wraps one inner archive is unwrapped automatically
- Single or multiple tar.gz parts are accepted
- With MariaDB/MySQL in
.env, thedb_backup.sqldump is used instead of a stale leftoverdb.sqlite3 - Tar extraction is guarded: no links or devices, no
../paths, same size limits as zip
Note
Update until the UI shows v5.0.2.
v5.0.1
v5.0.1
Fix: the migration wizard got stuck after uploading a split backup (e.g. backup_part_aa.zip). It showed "uploaded", but Continue did nothing and gave no error. (#197)
- Split-style part names (
backup_part_aa.zip,backup.zip.part_ab, …) are now recognized - The migration upload zone accepts several files at once; parts are assembled on the server automatically
- If a backup zip can't be used, the real reason is now shown (only one part, bad zip, no DB found)
- Added a manual release workflow (#198)
Note
Update until the UI shows v5.0.1.
v5.0.0
v5.0.0
Backup/migration hardening phases 0–3 and PasarGuard v5.6 compatibility, merged onto main as merge commits (#190–#195).
Phase 0 — Hotfixes (#190)
- Env last-wins source detection (avoids migrating stale sqlite when MySQL URL follows)
- Safer wizard uninstall (preserve backups / legacy combined installs)
- Telegram/bot token redaction in logs and errors
Phase 1 — Migration accuracy (#191)
- Keep usage history via
_pgkeep_*side tables - Faster MySQL multi-row inserts for history tables
- Finer value clearing on enum/JSON insert errors
- UTC offset handling for datetime strings / sessions
Phase 2 — Backup reliability (#192)
- Telegram retry queue with backoff
- Custom Telegram API URL support
- Stale-backup alert and manifest warnings
Phase 3 — Convenience & safety (#193)
- Fixed daily backup time (
run_at) - Safer updater rollback
PasarGuard v5.6 (#194, #195)
- Write subscription
url_prefixinto the real settings JSON schema - Keep WebAuthn passkey bytes intact; copy new v5.6 tables
Note
Code is on main @ 9be9c95. Update until the UI shows v5.0.0.
v4.9.9
v4.9.9
Fix — Pick the backup source that holds users on every path (#188)
- Marzban: with several SQLite files, prefer the one with users (newest copy wins). Live migrate detects the real engine from
/opt/marzban/.envand dumps MySQL/MariaDB correctly whendb.sqlite3is empty. - MySQL staging (→ PostgreSQL/Timescale): keep only the panel section of multi-database dumps; strip
/*!40000 DROP DATABASE */forms. - 3x-ui: pick the x-ui DB that has clients; refuse a 0-user result when the source has clients.
- Hiddify: pick the newest JSON export that has users (was the smallest).
- PasarGuard restore: among same-shaped dumps/sqlite files, prefer users, then newest.
Note
Code is on main @ b9ba70a. Update until the UI shows v4.9.9.
v4.9.8
v4.9.8
Fix — Pick the backup DB that holds the users (#186)
- When both
db.sqlite3and a.sqldump are present, count users in each and migrate from the one that actually holds them (logged asBackup sources: sqlite=N users, sql=M users). - Analyzer makes the same choice so the wizard pre-selects the right source.
- SQLite path records the source user count and refuses a core-only post-boot result.
Note
Code is on main @ fc38e40. Update until the UI shows v4.9.8.
v4.9.7
v4.9.7
Fix — Marzban MySQL → PasarGuard landing (#184)
- Dump rewrite strips
CREATE/DROP/USE DATABASE(incl./*!NNNNN */) so rows land in the panel DB, not a side schema. - Multi-database dumps keep only the Marzban section; the
.sqlthat actually holds users is preferred over generatedfixed_import*files. "marzban"is no longer bulk-replaced inside usernames, admin logins, host addresses, or notes — legacy subscription tokens keep working.- After import, if 0 users landed, tables are relocated from the side schema automatically; one import+heal+boot retry runs before failing.
- Job result includes
marzban_landing(users/admins/hosts: landed vs backup).
Note
Code is on main @ fdfbe8f. Update until the UI shows v4.9.7.
v4.9.6
v4.9.6
Fix — Upload / parts
- Multi-GB
/api/uploadno longer blocks the event loop (run_in_threadpool). - Date-stamped names like
backup-2025-10-29.zipare not mistaken for Telegram parts; complete panel zips skip useless repack. - Concatenated-part heal no longer loads the whole archive into RAM; failed zip/stream uploads clean their dirs.
- Panel-like zips auto-raise compression-ratio ceiling; clearer ratio error text.
Fix — Server-to-server stream
errorstatus no longer burns the receive token; concurrent writers get 409.- Push retries network errors (and brief 409) with 2/4/8s backoff by re-PUTting — no auth-gated status probe.
- Ready listeners live 6h;
/api/stream/status/is public (token is the auth).
Fix — Backup safety around restore/migrate
- Best-effort
pre_restorebackup viaasyncio.to_thread(opt out:PG_PRE_RESTORE_BACKUP=0). - Shared
.panel_busylock; schedule backoff + sparse failure notify; incomplete-job banner in the wizard. - Retention never drops the newest verified backup;
pre_restorearchives kept separately.
Note
Code is on main @ 0830de1. Update until the UI shows v4.9.6.