Ritzy One • Administrator / Vendor Guide — Internal

DBA Console

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.

Applies to every Ritzy One install  |  Internal / vendor tooling — not for customer distribution

1 Access & gating

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:

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.

ADMIN vs DBA
The DBA login is internal and never documented to customers. Customer-facing tasks use the ADMIN account. Keep this guide out of customer materials.

2 Console layout

Two controls sit in the console header and apply to whichever tab you are on:

3 The tabs at a glance

TabWhat you do there
SQL ConsoleRun 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 ScriptsThe 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.
CompaniesThe 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.
ModulesSee which modules the target company has installed and add more. Covered below.
Backup / RestoreBack 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 FirebirdBring a company over from a Delphi Ritzy 8 Firebird database (DB_<code>.FDB), as a new company or over an existing one. Covered below.
LicensingInstall-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.)

4 Modules — choosing and adding them

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.

When the company is created

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 later

  1. Set Target company in the header and enter the support password.
  2. Open the Modules tab. Each module shows Always included, Installed or Not installed.
  3. Tick one or more modules that are not installed and click Add selected modules, then confirm.

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.

Installed and licensed
A module must be both installed here and included in the licence before users can open it. When a licence is installed, the tab’s Licence column shows Not in licence for any module the licence does not cover.

Modules cannot be removed from this tab, because removing one would hide data that was already entered in it.

4a New company from the login page

A company can be created without signing in first:

  1. On the login page, type DBA in User ID. A Company Setup button appears; click it.
  2. Enter the support (setup) password.
  3. The Company List panel opens. New Company runs the full New Company wizard: it creates the company, installs the chosen modules, creates the administrator user, and offers the optional activation step. Existing companies can be renamed or removed from the list here too; the server checks the setup password again for each change.

The first-run Set up Ritzy screen (shown when no company exists yet) is unchanged.

4b Activating a company later

If the activation step in the wizard is skipped, the company can be activated later in either of two ways:

Administrators use the configured License Server
The administrator's Activate button always activates against the License Server this installation is already set up for. To point the installation at a different License Server, the DBA activates it in the DBA Console.

4c Delete a company permanently

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.

  1. Unregister the company from the License Server first, in the License Server console. Ritzy One does not do this for you, and the delete will not go ahead until you confirm it is done.
  2. Sign in to a different company as DBA and enter the support password. The company you are signed into cannot be deleted (its button is greyed out).
  3. On the Companies tab, click Delete permanently… beside the company.
  4. In the dialog, tick I have unregistered <code> from the License Server and type the company code. The Delete permanently button is enabled only when both are done.
  5. Click Delete permanently. The result lists the safety backup’s file name and how many records were deleted.

What happens

This cannot be undone
The only way back is to restore the safety backup with Backup / Restore → Restore as a NEW company, using the same code. Download it to your PC if you may need it later.

5 Backup / Restore — how it works

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:

Back Up Now→ .pgbk on server→ Download to your PC
.pgbk on your PC→ Upload to server→ Restore (new / replace)

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.

Whole-server backups
A .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.

6 Back up a company

  1. Set Target company in the header to the company you want to back up.
  2. Enter the Support password.
  3. Click Back Up “…” Now.

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.

Backups are non-disruptive
Users can stay logged in during a backup. (A restore that replaces a live database is different — see below.)

7 Download a backup to your PC

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.

Handle with care
A .pgbk contains all of the company’s data. Store downloaded backups somewhere secure.

8 Upload a backup from your PC

To restore a backup that is not already on the server — one you archived earlier, or took from another install — upload it first:

  1. Enter the Support password.
  2. Click Upload Backup (.pgbk) in the toolbar and choose the .pgbk file on your PC.
  3. The file is copied into the server backup folder and appears in the list. If a file of the same name already exists, a timestamp is added so nothing is overwritten.
  4. Restore it like any other backup (next section).

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.

Large uploads behind a proxy
If the install sits behind nginx (or another reverse proxy) and a big upload is rejected, raise the proxy’s upload limit — for nginx, client_max_body_size (default 1 MB). This is a server config setting, not something in the app.

9 Restore a backup

Click Restore on a backup row. Pick one of two modes:

Restore as a NEW company

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.

Replace the target company

Overwrites the target company’s data with the backup. The restore is done safely:

  1. A pre-restore backup of the company as it is now is written to the backup folder (ACME_pre-restore-….pgbk).
  2. The company’s data is removed and the backup’s loaded, in one transaction. If anything fails, nothing changes.
Ask the company’s users to log out first
Anything they save during the restore is lost when the backup’s data replaces it. Other companies are not affected and their users can keep working. To undo a replace, restore its pre-restore backup the same way.

10 Backup folder

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.

SettingPurpose
RITZY_BACKUP_DIRWhere .pgbk backups are read from and written to. Defaults to <RITZY_ROOT>/Backups.
PG_URLThe 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.

11 Import from Firebird (Delphi Ritzy 8)

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_<code>.FDB→ gbak copy + web upgrades→ Load in one transaction
  1. Enter the Support password and open the Import from Firebird tab.
  2. The list shows the 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.
  3. Click a file (or Check). The console reads its company code, name, base currency and Ritzy version, and says whether that code already exists here. Nothing is written.
  4. Choose A NEW company (give it a code and name) or Replace an existing company, then click Import.
  5. The import runs on the server; the log panel follows it. A company of a few hundred thousand rows takes a few minutes. You can leave the tab and come back: it shows the running or last import.
  6. When it finishes, an Import process is finished message stays on the screen. Click Log Out and log in again to use the company. If it fails, the error stays on the screen, nothing was changed, and you stay logged in.

What happens

SettingPurpose
FB_HOST / FB_PORT / FB_USER / FB_PASSWORDThe Firebird server that reads the file (defaults localhost / 3050 / SYSDBA / masterkey). Firebird must be installed on this server.
GBAK_PATH / FIREBIRD_BINWhere gbak is, when it is not found in the Firebird install folder.
RITZY_FB_DATA_DIRThe folder the file list opens on. Defaults to <RITZY_ROOT>/Data.
RITZY_IMPORT_WORK_DIRWhere the upgraded copy goes during the import (deleted afterwards).
PG_URLThe owner connection. The import needs it, as restore does.
Time zone
Delphi stores times without a zone; they are read in the server’s time zone, shown on the tab. Run the import on a server set to the zone the company worked in.
Whole migrations
To move every company of a Delphi install into a new, empty database at once, with a full validation report (trial balance, stock, party balances), use the command-line importer npm run pg:convert instead.

12 Troubleshooting

SymptomCause & fix
“Restore is not available”The API has no owner connection. Set PG_URL in its settings and restart it.
“Enter the support password” warningThe 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 rejectedA 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-newThe 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 outYou are signed into that company. Sign in to another company to delete it.
Good habit
Before a risky change, take a fresh backup and Download it to your PC. A replace restore also leaves a pre-restore backup on the server, but an off-box copy is your real insurance.