Ritzy One • Administrator / Vendor Guide — Internal
The support-only control panel behind a Ritzy One install — run SQL, apply upgrade scripts, manage companies and their databases, install licence keys, and back up & restore company databases (including download to and upload from your own PC). This guide is for Ritzy staff, not end customers.
The DBA Console lives at /dba-console and is deliberately hard to reach — it can run arbitrary SQL, upgrade the database and replace a company’s data. Two gates apply, both enforced on the server for every call:
DBA account. No other user — not even ADMIN — can open the console.Two-factor authentication is optional for the DBA account. If it is enrolled (under My Account), the code is asked at login; the console itself does not require it.
DBA login is internal and never documented to customers. Customer-facing tasks use the ADMIN account. Keep this guide out of customer materials.Two controls sit in the console header and apply to whichever tab you are on:
| Tab | What you do there |
|---|---|
| SQL Console | Run ad-hoc SQL as the target company, execute a multi-statement script, and edit query results inline. Every company is in one PostgreSQL database; the console sees only the target company’s rows. Tables, Views and Sequences list what is in the database. Support password required to execute. |
| Upgrade Scripts | The database upgrades shipped with this build. Each shows applied, pending or changed (applied, but the file differs from the one that ran). Upgrades apply to the whole database — every company at once — once each and in order; the server also applies pending ones itself when it starts. Run applies every pending upgrade up to the chosen one. The tab also shows / sets the company’s recorded DB version. |
| Companies | The company list. Add Company opens the new-company wizard, which creates the company (including choosing its modules). Edit renames a company; remove takes it off the list (its data stays in the database, and the company stays in the list tagged Removed). Delete permanently… removes a company and all of its data for good — see 4c. A company is otherwise added only by restoring a backup as a new company, or by importing it from Firebird. |
| Modules | See which modules the target company has installed and add more. Covered below. |
| Backup / Restore | Back up a company, download a backup to your PC, upload one from your PC, restore a backup into a new or existing company, and manage the backup files. Covered in detail below. |
| Import from Firebird | Bring a company over from a Delphi Ritzy 8 Firebird database (DB_<code>.FDB), as a new company or over an existing one. Covered below. |
| Licensing | Install-only licensing — paste or upload a signed .lic key Ritzy issued, set the License Server URL and trusted public key, and view / remove the installed licence. (Issuing keys is done on the separate License Server.) |
Accounts is part of every company. The other modules are optional: Cargo (ticked by default), Liner, Marine, Warehousing, Transport, Shipchandling, Payroll and CRM / Sales Pipeline. Every optional module, Cargo included, is also licensed separately (see the Licensing guide). Each of them stands on its own: Liner, Marine, Transport, Warehousing and Shipchandling no longer need Cargo. The same applies when adding modules later.
The new-company wizard (Companies → Add Company, or the Company Setup on the login page, or the Set up Ritzy screen on a new install) has a Modules step after the company details. Tick the modules the company needs. Only those are switched on; the administrator account and the DBA are made administrators of each one, and job numbering is created for the ones that have jobs (Liner, Marine, Transport, Shipchandling).
The same wizard asks for the Base Currency from a list of all ISO currencies. It is pre-filled only when the browser’s language setting names a country; otherwise pick one. A currency that is not in the standard currency master is added to it automatically.
Whichever modules are ticked, a new company starts with short lists of common sea ports, airports, airlines, service types, commodities, package types and container types, and a Currency master of 40 common currencies with their standard decimal places. These are ordinary records the company can edit or delete.
Adding a module creates its tables and menu entries (this also works on an older database that never had them), makes the DBA and every Accounts administrator its administrators, and adds its job numbering to each financial year. Users see the new module after they sign in again. Other user groups need their rights granted in Tools → User Manager → Rights as usual.
Modules cannot be removed from this tab, because removing one would hide data that was already entered in it.
A company can be created without signing in first:
DBA in User ID. A Company Setup button appears; click it.The first-run Set up Ritzy screen (shown when no company exists yet) is unchanged.
If the activation step in the wizard is skipped, the company can be activated later in either of two ways:
DBA user, in DBA Console → Licensing: enter the activation code from the email. Fill in the License Server URL only if it is not already configured.ADMINISTRATOR group, such as ADMIN): click Activate beside the licence message at the top of the screen and enter the code. If the trial has already ended, the administrator can still sign in; they see only the Activate Ritzy screen until the licence is activated, then sign in again.Remove only takes a company off the list; all its records stay in the database. To get rid of a company completely — typically a test company — use Delete permanently… on the Companies tab. Companies already removed from the list are shown there too, tagged Removed, so they can be deleted as well.
DBA and enter the support password. The company you are signed into cannot be deleted (its button is greyed out).ACME_pre-delete-….pgbk).Every company lives in one PostgreSQL database. A company backup is a single .pgbk file holding all of that company’s data and nothing of any other company. It is read in one consistent snapshot, so a company can be backed up safely while people are using it.
Backups are made on the server, in the backup folder. From there you can:
A backup restores into an install at the same or a newer version: tables and columns added since the backup was made take their defaults. A backup from a newer version than this install is refused; upgrade the install first.
All Backup / Restore actions require the support password.
.pgbk is for one company. To protect the whole server, the database is also backed up with PostgreSQL’s own tools (pg_dump); the Docker stack does this nightly. See the installation guides.A timestamped file named like ACME_20261031-143022.pgbk appears in the list. The Backup / restore log panel below the list shows the details if you need them. Use Refresh List to re-read the folder.
Each row in the backup list has a Download button. Click it to save that .pgbk to your own machine — for off-site storage, to move it to another install, or to keep an archive copy.
.pgbk contains all of the company’s data. Store downloaded backups somewhere secure.To restore a backup that is not already on the server — one you archived earlier, or took from another install — upload it first:
.pgbk file on your PC.Only .pgbk files are accepted (a company from the Delphi system is brought in with Import from Firebird, not here); the upload streams straight to disk on the server, so even large backups don’t need to fit in memory.
client_max_body_size (default 1 MB). This is a server config setting, not something in the app.Click Restore on a backup row. Pick one of two modes:
Loads the backup as a new company. You supply a new company code (1–5 letters/digits) and name. This never touches any existing company — use it to make a copy for testing, or to bring a customer’s backup onto your own server for investigation.
Overwrites the target company’s data with the backup. The restore is done safely:
ACME_pre-restore-….pgbk).The info banner on the tab shows the exact backup folder in use. By default it is <RITZY_ROOT>/Backups; override it with the RITZY_BACKUP_DIR environment variable.
| Setting | Purpose |
|---|---|
RITZY_BACKUP_DIR | Where .pgbk backups are read from and written to. Defaults to <RITZY_ROOT>/Backups. |
PG_URL | The owner connection to the database. Restore needs it; without it the tab says restore is not available. |
The Delete button on each row removes a backup file from the server folder. Downloaded copies on your PC are unaffected.
Moves one company from a Delphi Ritzy 8 database into this install. The source is the company’s DB_<code>.FDB; a DOC_<code>.FDB in the same folder is read too, for the attachments.
DB_*.FDB files in the server’s data folder (<RITZY_ROOT>/Data, or RITZY_FB_DATA_DIR). Type another folder and click List Files, or type the full path of a file.gbak into a work folder (the system temp folder, or RITZY_IMPORT_WORK_DIR; allow room for the database’s size), the web upgrades are applied to the copy, and the copy is read. Errors on S_* shipping objects in a company without shipping are expected.ACME_pre-import-….pgbk), which Backup / Restore can put back. Ask that company’s users to log out; other companies keep working.| Setting | Purpose |
|---|---|
FB_HOST / FB_PORT / FB_USER / FB_PASSWORD | The Firebird server that reads the file (defaults localhost / 3050 / SYSDBA / masterkey). Firebird must be installed on this server. |
GBAK_PATH / FIREBIRD_BIN | Where gbak is, when it is not found in the Firebird install folder. |
RITZY_FB_DATA_DIR | The folder the file list opens on. Defaults to <RITZY_ROOT>/Data. |
RITZY_IMPORT_WORK_DIR | Where the upgraded copy goes during the import (deleted afterwards). |
PG_URL | The owner connection. The import needs it, as restore does. |
npm run pg:convert instead.| Symptom | Cause & fix |
|---|---|
| “Restore is not available” | The API has no owner connection. Set PG_URL in its settings and restart it. |
| “Enter the support password” warning | The support password field at the top of the console is empty. Enter it and retry. |
| “The backup comes from a newer schema” | The backup was made on an install with upgrades this one does not have yet. Update this install, then restore. |
| “Not a Ritzy PostgreSQL company backup” | The file is damaged or is not a .pgbk. On a replace nothing was changed. |
| Large upload rejected | A reverse proxy is capping the request size. Raise its upload limit (nginx: client_max_body_size). See section 8. |
| “Could not open … on the Firebird server” (import) | The Firebird service is not running, the path is not a database, or FB_USER / FB_PASSWORD are wrong for this server. The path is the one the Firebird server sees. |
| “gbak was not found” (import) | Install Firebird on the server, or set GBAK_PATH. The import needs gbak to copy the database before upgrading the copy. |
| “Company already exists” on restore-to-new | The code you typed is already registered. Pick an unused 1–5 character code. |
| “Unregister … from the License Server first” (delete) | The License Server tick box was not ticked. Unregister the company in the License Server console, then tick it. |
| “… is still referred to from outside it” (delete) | Another company links to this one (group ownership, intercompany vouchers). Remove those links, then delete again. Nothing was deleted. |
| Delete permanently… is greyed out | You are signed into that company. Sign in to another company to delete it. |