The bugsoft command

  • For IT
  • Bugsoft Portal 4.12.14

Every admin task on the server goes through sudo bugsoft: the commands of Bugsoft Portal itself, plus update, backup, restore, status, keys and uninstall.

A server set up with install.sh has one command for all admin tasks: bugsoft.

Always use sudo bugsoft …. Never run php bin/console as root: files then become owned by root, and Bugsoft Portal can no longer use them.

Each command with --help after it explains what it does. sudo bugsoft list shows all commands with their options.

Server commands

These commands belong to the server set-up of install.sh.

CommandWhat it does
sudo bugsoft statusIs everything all right? See Check and monitor the server.
sudo bugsoft update --latestDownload the newest version that the licence check names, check it and install it (--yes: do not ask); see Update Bugsoft Portal.
sudo bugsoft update PACKAGEInstall a new version from a downloaded package; see Update Bugsoft Portal.
sudo bugsoft backupMake a backup now; see Backups and restoring.
sudo bugsoft restore DATERestore a backup (--list, --keys, --decrypt-key).
sudo bugsoft keysConfirm that the keys are in your password vault.
sudo bugsoft uninstallRemove Bugsoft Portal from the server; see Stop using Bugsoft Portal.

Bugsoft Portal commands

All other commands go to Bugsoft Portal itself. They run as the user bugsoft, with the settings from /etc/bugsoft/bugsoft.env.

Checks and help

CommandWhat it does
sudo bugsoft production:checkThe checklist (with --json for scripts); see Check and monitor the server.
sudo bugsoft license:statusThe licence: status, plan, users and end date.
sudo bugsoft license:latestThe newer version this installation may download, from the last licence check: version, SHA-256, link and until when it works (--check: check first; --json for scripts). Installs nothing; see Update Bugsoft Portal.
sudo bugsoft license:install BH1.…Check and save a licence key (or --file=PATH); see The licence.
sudo bugsoft mail:test ADDRESSSend a test e-mail; see Set up e-mail.
sudo bugsoft support:reportA file with support details, without passwords, keys or e-mail addresses (--with-logs, --out=PATH); see Get help and support details.
sudo bugsoft audit:verifyCheck that the audit log has not been changed; see The audit log.
sudo bugsoft entra:checkTest the connection with Microsoft Entra ID: tenant, app, secret and permissions (--brief for one line).
sudo bugsoft permissions:listAll permissions, with their module, an explanation and the roles that have them.
sudo bugsoft modules:checkCheck that the parts of Bugsoft Portal are in order (after an update this should show nothing).

Administrators and the emergency account

CommandWhat it does
sudo bugsoft admin:grant ADDRESSMake an account from the sign-in system an administrator, now or at its first sign-in (--role=, default superadmin).
sudo bugsoft breakglass:createCreate an emergency account (password and required TOTP; --email=, --name=); see The emergency account.
sudo bugsoft breakglass:listList all emergency accounts.
sudo bugsoft breakglass:reset-totp ADDRESSGive the emergency account a new authenticator key.
sudo bugsoft breakglass:disable ADDRESSSwitch off an emergency account and end its sessions.
sudo bugsoft seed:productionSet the basis for production again: migrations, optionally the name and language, and one emergency account if there is none (--admin=ADDRESS, --starter=microsoft365; --fresh first empties everything, with a backup).
sudo bugsoft starter:install microsoft365Add the starter set with tiles for Microsoft 365. Running it again puts back starter content that was removed.

Keys

CommandWhat it does
sudo bugsoft key:generateA new APP_KEY, only for a new installation; see Keys and secrets on the server.
sudo bugsoft vault:keygenMake a new key (KEK) for the saved sign-in details; see Keys and secrets on the server.
sudo bugsoft vault:rotate-kekEncrypt everything again with the active KEK (after changing VAULT_KEK_ACTIVE).
sudo bugsoft vault:rotate-dek NUMBERGive one store of sign-in details a new data key, and encrypt everything in it again.
sudo bugsoft vault:knop-keyMake the key for your own Bugsoft Connect package and show the values for Intune (--rotate only after misuse); see Your server's own package.

Data and settings

CommandWhat it does
sudo bugsoft config:export FILEExport the settings as JSON (--sections=a,b), for example from the test environment.
sudo bugsoft config:import FILE --dry-runSee what an import changes; then run it without --dry-run. See A test environment and production.
sudo bugsoft backup:runMake a backup now with the PHP backup of Bugsoft Portal (SQLite). On an install.sh server, use sudo bugsoft backup.
sudo bugsoft backup:listList the backups of the PHP backup.
sudo bugsoft backup:restore NAME --forceRestore a backup of the PHP backup. The current state is saved first (--database-only). With install.sh: sudo bugsoft restore.
sudo bugsoft directory:syncUpdate the names of the Microsoft Entra groups through Microsoft Graph (--dry-run to look first).
sudo bugsoft stats:aggregateSummarise the statistics of a day (--day=) or a period (--from= --to=) again. Cron does this every night.
sudo bugsoft retention:pruneDelete statistics and sign-ins past their retention period now (--dry-run to look first). Cron does this too.
sudo bugsoft cache:clearEmpty the cache.
sudo bugsoft cron:runRun the scheduled tasks that are due. The server starts this every minute by itself (Check and monitor the server).

The database and the installation

CommandWhat it does
sudo bugsoft migrateRun pending database changes (an update does this by itself).
sudo bugsoft migrate:statusShow which database changes have been made.
sudo bugsoft migrate:rollbackUndo the last database changes (--steps=). Only when support asks you to: restoring a backup is usually better.
sudo bugsoft install:lockLock the installation: checks the configuration file, the database and the migrations, and removes install.token.
php bin/console installInstall Bugsoft Portal without a browser; install.sh uses this itself. See Install by hand.

For the demo and for developers

These commands do not belong on a production server.

CommandWhat it does
php bin/console demo:resetRebuild the database and fill the fictional demo world (only in demo mode); see Try the demo.
php bin/console demo:seedFill the demo world (--modules=a,b, only in demo mode).
php bin/console demo:checkCheck that the demo works.
php bin/console migrate:freshDrop all tables and start again; refuses in production.
php bin/console serveStart the development server (--port=, --host=).
php bin/console testRun the tests (only in the source code, not in the package).
php bin/console listAll commands (on the server: sudo bugsoft list).

Without install.sh

On a server you set up by hand (Install by hand), use this instead of bugsoft:

sudo -u <web user> php /path/to/bugsoft/bin/console <command>

Stuck? See Questions and problems or contact Bugsoft at ugurs156@gmail.com.