System Info & Diagnostics¶
Log safeguards
Live and historical log views, searches and downloads redact credential fields and configured secrets. Large or incomplete records can be omitted. A processing deadline explains how to use the support bundle or narrow the search; a busy reader is a separate retryable refusal. The bundle includes a bounded recent log tail, while a full log download can exceed the processing deadline.
Stopping bug-report recording restores the previous logging mode even when its log tail is unavailable; the report gets a notice instead. Full database backups still contain credentials and must be kept private.
The Information page (sidebar → Information, route /system) is BamDude's admin diagnostics surface — version metadata, database row counts, storage breakdown, the log viewer, debug-logging toggle, support bundle generator, and the maintenance buttons (optimize DB, rebuild search index). Update checks live in Settings → General → Updates — see Update checker.
What it is¶
A read-only dashboard that pulls from GET /api/v1/system/info (most of the page), GET /api/v1/system/storage-usage (the storage breakdown), and GET /api/v1/support/logs (the log viewer). Maintenance actions are POST endpoints behind the appropriate permissions. Health is reported by the local installation; no external metrics database is required (for that, see Prometheus).
The Information page also shows separate, read-only health for the local preview, camera and 3MF filament-analysis workers. Camera failure affects camera features; analysis failure pauses new filament-usage projections. Neither stops unrelated printing or queues; a job requiring a camera check can wait for camera recovery. The analysis service reads the selected archive 3MF locally and sends only its bounded result through the bundled broker; it does not upload the whole 3MF to a remote service. A previously calculated print context remains cached until that print is released.
The Library file worker prepares uploaded and mounted files and their 3MF plate metadata. Its outage prevents new file preparation and folder scans; existing files remain available. Check this panel when upload or scan logs say library file service unavailable.
The Part thumbnail worker renders the part pictures. Its panel shows Available, Fallback only (no official Node.js build for this machine) or Unavailable; the reason in a sentence with its code beside it; the pinned Node.js version and its date; the queue — plates waiting and failed; and the last attempt's outcome and time. When it is not available, the panel links to its troubleshooting. An outage stops only new pictures: products, orders and stock keep working, and waiting plates are not counted as failed.
The STEP preview component line, in the same preview section, shows the component that makes STEP thumbnails: the administrator's choice — Enabled by the administrator: updates keep it current, Disabled by the administrator: updates leave it alone or Not chosen yet — and the component's state — Installed, Not installed, Not available for this machine, State unknown or Not usable (reason). Installed is not works: only install/step-preview.sh status, run on the server, checks that it really renders. On a native install the line also shows the two commands — To install or repair it, run on the server: install/step-preview.sh enable, and To check that it renders: install/step-preview.sh status; Docker and the Windows installer carry the component and show its state only. See Installation → STEP previews and Troubleshooting → STEP thumbnails.
Database health is shown independently of these workers. A failed SQL check does not abort the other checks: missing pg_stat_statements leaves a statistics warning while version, size and other readable fields remain available. See PostgreSQL setup for enabling it; updating only BamDude does not configure an external PostgreSQL server.
Version info¶
| Field | Source |
|---|---|
version |
APP_VERSION from backend/app/core/config.py, set at build time by node scripts/set_version.js. |
python_version |
Python interpreter version of the running process. |
| Database engine + version | SHOW server_version on PostgreSQL, SELECT sqlite_version() on SQLite. |
platform / architecture / hostname |
From Python's platform module. |
boot_time / uptime |
System boot time from psutil, formatted to Nd Nh Nm. |
Build date and git SHA are not exposed via this endpoint — release builds bake the version string at set_version.js time, that's the canonical identifier. The frontend's build-time Node version isn't reported either (the bundle ships pre-built under static/); the pinned Node.js of the part-thumbnail renderer is shown in the Part thumbnail worker panel.
Database stats¶
GET /api/v1/system/info aggregates row counts and a few sums:
| Stat | What it counts |
|---|---|
archives |
Total print_archives rows. |
archives_completed / archives_failed / archives_printing |
Same, partitioned by status. |
printers |
Total registered printers. |
spools |
Total spool records (live inventory rows). |
projects |
Total projects. |
smart_plugs |
Total registered smart plugs. |
total_print_time_seconds / _formatted |
Sum of print_time_seconds across all archives. |
total_filament_grams / _kg |
Sum of filament_used_grams. |
database.size (under storage) |
File size of bamdude.db, or PostgreSQL DB size if PG is in use. |
archive_size_bytes / _formatted (under storage) |
Total size of the archive directory. Walked on a worker thread — never on the server's main loop — once for all open pages, and reused for up to 60 s. |
Storage usage breakdown¶
GET /api/v1/system/storage-usage walks the data directories and classifies every file into one of these buckets, returning size + percentage of total:
| Bucket | Roots covered |
|---|---|
database |
bambuddy.db (and a legacy bambutrack.db if present). |
library_thumbnails / library_files / library_other |
<data_dir>/library/.... |
archive_files / archive_thumbnails / archive_timelapses |
The archive directory itself. |
virtual_printer_uploads / virtual_printer_upload_cache / virtual_printer_certs / virtual_printer_other |
<base_dir>/virtual_printer/.... |
downloads |
<base_dir>/firmware/. |
attachments |
<data_dir>/projects/ and <data_dir>/products/ — order and product attachments. |
plate_calibration |
The plate-detection reference image directory. |
logs |
The configured log directory. |
other_data |
Anything under the data dirs that didn't match a rule, with a per-bucket sub-breakdown distinguishing system (deletable=false) from data (deletable=true). |
The scan is cached for 5 minutes (STORAGE_USAGE_CACHE_SECONDS = 300). Pass ?refresh=true to force a re-scan; pass max_age_seconds=N (clamped to 0–3600) to override the cache TTL.
Use this before backups
Eyeballing the breakdown ahead of a backup tells you whether your archive folder is the dominant share (it usually is) and whether you have headroom to keep timelapses, or should prune them first.
Resource usage¶
| Stat | Source |
|---|---|
| CPU count + percent | psutil.cpu_count() / psutil.cpu_percent(interval=0.1). |
| Memory total / available / used / percent | psutil.virtual_memory(). |
| Disk total / used / free / percent | psutil.disk_usage(base_dir). |
connected_printers |
Live MQTT-connected printers from printer_manager. |
The values are point-in-time — refreshing the page re-samples them (the archive size above may be up to a minute old). The CPU sample is also taken off the main loop. There's no historical rollup here. For time-series, scrape Prometheus.
Log viewer¶
GET /api/v1/support/logs tails <log_dir>/bamdude.log, parses each line into a structured entry, and returns the most recent entries first.
| Param | Notes |
|---|---|
limit |
1–1000, default 200. |
level |
DEBUG, INFO, WARNING, or ERROR. Case-insensitive. |
search |
Substring match against the message body and the logger name. Case-insensitive. |
Multi-line entries (stack traces, especially) are reassembled — a continuation line gets attached to the next-parsed entry above it.
| Action | Endpoint | Permission |
|---|---|---|
| List recent logs | GET /api/v1/support/logs |
settings:read |
| Truncate the log file | DELETE /api/v1/support/logs |
settings:update |
| Toggle DEBUG-level logging | POST /api/v1/support/debug-logging |
settings:update |
DEBUG-level logging is gated
The _apply_log_level helper pins httpcore and httpx to WARNING even in DEBUG mode — full request URL logging would leak bearer tokens in Discord / generic-webhook URLs. paho.mqtt switches to DEBUG when the toggle is on, which is where most useful printer-protocol detail lives.
Log rotation + retention¶
The active log file (bamdude.log) rolls over on the first log entry after midnight (server local time). Archives are plain text, named bamdude-YYYY-MM-DD.log. Restarting during the day does not force rotation.
Under Information → Log Files, bamdude.log appears first with a Current label, its size, modification time and Download button. It is available even before the first daily archive exists. Download saves the full file as it stands when copying begins; logging continues. There is no restart or DEBUG-mode requirement, and no support-bundle tail limit. The size shown in the list is refreshed with Refresh and may differ from the later download as new entries arrive.
Daily archives follow, newest first, with Download and a two-step Delete confirmation. The current row has no delete action; the existing Truncate action in the log viewer remains separate.
Current-log download uses GET /api/v1/support/logs/download and requires settings:read. It serves raw text, like archive downloads. The backend copies a bounded snapshot in a worker thread, closes the live file before network transfer, and removes the temporary copy after transfer or disconnection. If the log is cleared during copying, retry the download.
log_retention_days defaults to 7 (range 1–365). Operators with settings:update can change it in Settings. The new limit applies to the live handler immediately, with excess archives removed on the next successful rotation; saving the setting does not delete them immediately.
Support bundle¶
GET /api/v1/support/bundle produces a ZIP file containing:
| File | Contents |
|---|---|
support-info.json |
Version, OS info, DB row counts, sanitised printer/integration info, anonymised settings, dependency versions, log-file size, network interfaces with masked subnets, WebSocket connection count, Docker memory limit (if containerised), and the BamDude process itself — see below. |
bamdude.log |
The tail of bamdude.log, sanitised. |
push-status/printer-N.json |
The last status report of printer N, structurally redacted — the shape of that model's firmware payload. |
mqtt/printer-N/… |
Only when you tick a printer's raw MQTT recording: the unsanitised capture, under its original file name. |
How printers are numbered in a bundle¶
A bundle never names a printer. Each one is a number from 1, given by its place among the bundle's printers ordered by id, and the same machine has the same number everywhere in that bundle: the printers list, the per-printer queue rows, the connection diagnostics (where index sits beside the printer's printer_id), push-status/printer-N.json and mqtt/printer-N/. The printers are read once per bundle, so a printer added, removed or re-added while the bundle is being made never shifts another one's number or lends it its data.
The number means something only inside its own bundle — printer 2 of today's bundle may be another machine in next week's. support-info.json says so in its printer_index key; bundles made before that key existed matched sections by position, which was not always the same machine.
A printer's connection check that runs out of time is recorded as timed out together with the step it was in, how long it had run, and the checks that had finished before it.
The BamDude process itself¶
Beside the machine, the database, the printers and the settings, the bundle describes the process actually running. A report of "memory climbs for days until it gets killed" is otherwise nothing to act on: the numbers that identify the cause only exist while it is happening, and by the time anyone asks, the container has been restarted.
Bundles carry:
| Field | Why it matters |
|---|---|
| Memory in use vs memory reserved | The difference between those two is what separates a real leak from harmless address space |
| Thread and child-process counts | A climbing thread count is a different bug from a climbing heap |
| Open files and sockets | Descriptor leaks look like memory leaks from the outside |
| Uptime | Puts every other number in scale |
| A breakdown of what the memory is filled with | Points at which allocation is growing |
On a process already very large, the breakdown is skipped — and says so
Generating a bundle to diagnose runaway memory must not be the thing that finishes the machine off.
Child processes are recorded by name only, never by command line — an
ffmpeg command line contains the camera password.
This lands in both the bundle you download and the pack attached to a bug report.
The bundle requires debug logging to be currently enabled — the endpoint refuses to generate one otherwise (400 Debug logging must be enabled before generating a support bundle). Workflow:
- On the Information page, under Support & Troubleshooting, turn Debug Logging on.
- Reproduce the issue.
- Generate the bundle.
- Flip DEBUG logging back off (it stays on otherwise — the state is persisted in the
Settingstable and re-applied on restart).
Sanitisation¶
_sanitize_log_content and _collect_support_info work together to keep secrets out:
- Printer names →
[PRINTER], serial numbers →[SERIAL], IP addresses →[IP], access codes →[ACCESS_CODE], usernames →[USER], emails →[EMAIL]. - URL credentials (
http://user:pass@host,rtsps://bblp:code@host) →[CREDENTIALS]@. - LDAP Distinguished Names →
[DN]. A DN's leadingCN=is the user's real name, so it is treated like an email address. Unlike everything else on this list it cannot be looked up in the database — a DN is per-user and comes from your directory — so it is matched by shape instead: two or more comma-joinedattr=valuecomponents.CN=Joe Schmoe,OU=Staff,DC=example,DC=comis therefore removed wherever it appears, including inside an error message raised by the directory library. A lonekey=valuein an unrelated line is left alone. - Path components like
/home/<user>/,/Users/<user>/,/opt/<user>/collapsed to/home/[user]/etc. - MQTT relay broker → masked: bare IP becomes
[IP], hostname becomes*.tld. - Subnets in network info → first two octets become
x.x(so192.168.1.0/24→x.x.1.0/24). - Settings values — keys containing any of
access_code,password,token,secret,api_key,cloud_token,mqtt_password,email,username,vapid,private_key,public_key,webhook,url,path,config,_ip,host,credentialare redacted to[REDACTED](or""if empty). Any other settings pass through as-is, so feature flags and themes are visible in the bundle.
Printer summaries and push-status snapshots preserve catalog model names when a printer has that same display name. The export masks configured physical and virtual printer names in free text. Short names match whole tokens. It also masks virtual printer serials from before and after a model change.
Printer command entries record selected tray and tool parameters, sequence IDs, recognized results and numeric verdict codes. Slicer dispatch entries can show the source, a recognized plate number, tray positions and print flags. Opt-in MQTT recordings contain the captured messages themselves.
The bundle is the right thing to attach to a GitHub issue when reporting a bug.
Maintenance actions¶
| Action | Endpoint | Permission |
|---|---|---|
Optimize / vacuum SQLite — runs ANALYZE, PRAGMA wal_checkpoint(TRUNCATE), then VACUUM |
POST /api/v1/settings/optimize-db |
settings:backup |
| Rebuild archive search index — see Search | POST /api/v1/archives/search/rebuild-index |
archives:update_all |
There is no separate "Clear Cache" button on the Information page — the page-level caches (storage breakdown, system info) auto-expire on their own; the only manual flush is the ?refresh=true query param on /system/storage-usage.
There is also no "Restart application" button — the upstream Bambuddy concept of an in-app restart only makes sense for bare-metal/systemd installs, and the BamDude target deployment is Docker. Restart the container with docker compose restart bamdude (or whatever your orchestrator uses); on a native install sudo systemctl restart bamdude.
Update checker¶
Settings → General → Updates → BamDude Software (Check now, Install Update) is the UI of this checker. GET /api/v1/updates/check polls GitHub Releases and compares the latest tag to APP_VERSION. Two settings keys steer it:
| Setting key | Effect |
|---|---|
check_updates (default true) |
When false, the endpoint returns {update_available: false, message: "Update checks are disabled"} without hitting GitHub. |
include_beta_updates (default false) |
When true, prereleases (X.Y.ZbN) are eligible matches. When false, only stable releases are surfaced. Detection is dual-signal: a release is treated as a prerelease if its tag matches bN/betaN/alphaN/rcN OR if it's marked prerelease in the GitHub UI. |
The check response carries is_prerelease, latest_version and update_method (git, docker, ha_addon or windows_installer; is_docker stays for older bundles), plus installer_download_url for Windows and compose_dir_detected for Docker, so the UI can render the right install guidance per channel + per install shape.
In-app apply (native installs)¶
POST /api/v1/updates/apply does the actual git checkout + dependency install. Behaviour:
- Accepts an optional
tag_namebody field — the frontend passes back what it just got from/checkso apply hits the exact release the user saw. - Resolves to a
vX.Y.Z[bN]git ref via_resolve_git_ref()(handles bothv-prefixed and bare forms). - Runs
git fetch origin --tags --prune --forcefollowed bygit reset --hard refs/tags/<ref>. This works for any tag regardless of branch — beta tags live ondev, notmain. - Installs Python deps (
pip install -r requirements.lock, orrequirements.txton a checkout from before the lock), provisions the pinned part-render Node.js runtime, refreshes the STEP preview component when it is enabled (if that fails, the UI says the component was not updated while BamDude itself was), and, when npm is available, rebuilds the frontend bundle (npm ci && npm run build) and the AI client packages, asupdate.shdoes; a failed AI client build only marks those packages unavailable. - Takes no backup and restarts nothing: when it reports Update complete! Please restart the application., restart the service yourself (
sudo systemctl restart bamdude).
The endpoint requires settings:update. Trigger from Settings → General → Updates → Install Update when an update is shown as available.
Licences¶
Settings → General → Updates → Licences opens BamDude's licence and the installation's third-party notices. GET /api/v1/about/licenses/{kind} (kind = third-party or license, permission settings:read) returns {name, text} from where the distribution put the files: /app in the Docker image, the install folder on Windows. A copy run from the source code has no notices file and answers 404 with {"error": "notices_not_shipped"}.
Windows and Home Assistant installs¶
/apply refuses these too. A Windows-installer install is updated by running the new installer — the UI links the release's setup file (installer_download_url) and your data, settings and printers stay. The Home Assistant add-on is updated through the Supervisor.
Docker installs¶
Docker installs reject /apply with is_docker: True — running git fetch / pip install / npm build inside a live container would corrupt the image. Instead, the UI surfaces two side-by-side blocks with concrete commands using the resolved latest_version + is_prerelease:
Image-based (typical) — the UI pins the exact version it found, in the image name of the shipped compose (ghcr.io/kainpl/bamdude); kainpl/bamdude on Docker Hub carries the same tags. When the Compose directory (on the host) field or BAMDUDE_COMPOSE_DIR names your compose folder, the commands start with cd into it:
# docker-compose.yml
image: ghcr.io/kainpl/bamdude:0.7.5b1 # for betas — explicit pin required
# OR
image: ghcr.io/kainpl/bamdude:0.7.4 # the stable release found
The hint explains why :latest will not pick up a beta: a stable release tag updates :latest, while beta tags publish :X.Y.ZbN and update :dev. A branch push alone does not update either release channel.
Source-build — for operators who cloned the repo and use build: in compose:
git fetch origin --tags --prune --force
git checkout v<version>
docker compose build --pull
docker compose up -d
This is the BamDude self-update path. For printer firmware updates, see Firmware Updates — completely separate flow.
Permissions¶
| Action | Permission |
|---|---|
| View system info, storage usage, update check | system:read |
| View logs, get debug-logging state, generate support bundle | settings:read |
| Toggle debug logging, clear logs | settings:update |
| Optimize/vacuum DB, restore backup | settings:backup |
| Rebuild archive search index | archives:update_all |
There is no system:maintenance or support_bundle:create permission — the support bundle and log endpoints sit under the settings namespace.
API reference¶
Print-state diagnostics and recovery¶
Print state diagnostics lists unresolved differences between queue claims and execution archives. It checks the current records and fresh printer observations; Check again repeats the check without changing data. Offline telemetry alone does not prove a print is stuck. Continue through all pages when the list is partial.
An operator can preview an addressed correction, review Before → After, and confirm it. Depending on the evidence, the panel can align an old item with its terminal archive, release an orphan queue header, or fill a missing completion time from the archive start plus the slicer duration. The last action requires explicit confirmation that this archive belongs to that completed print. Its time remains visibly estimated and cannot authorize deletion.
Remove stale item, keep archive appears only for a proven completed execution with an actual end time and no dependent AutoQueue, calibration, receipt or order records. Ambiguous identity, unresolved completion/swap effects or an uncertain printer state remove the action entirely. There is no forced delete. Archives, accounting and source files are preserved.
A repair on an inactive printer leaves its queue paused: inspect the plate before resuming. A proven old item can also be corrected while a positively identified newer print continues; that print and its queue header are preserved. The panel sends no printer commands and does not repeat completion accounting or macros. A changed or expired preview must be prepared and confirmed again. Successful actions appear in the printer's recovery history.
A dispatch that was interrupted. If BamDude stopped while it was starting a queued job, the job and its archive can still read printing although the printer was never seen running it. Such a job is never closed as completed because the printer shows the previous print of the same file as finished. A job whose start command was provably never sent goes back to the queue by itself once the printer reports that it is idle and new work is allowed. Otherwise the panel lists A dispatch was interrupted before the printer was seen printing. Close the interrupted attempt is offered only when the BamDude process that owned the attempt has ended, the printer is idle and nothing else is running on it — or when this BamDude process itself could not read the printer's answer to a start it sent and stopped watching it (the printer must still be idle, with nothing but this attempt bound to it). It marks the job and its archive failed and stops that printer's queue with an error; it does not prove that nothing was printed, so check the printer and the plate first. To print the job again, use Retry on it, then resume the queue.
A finished print still held in memory. A printer's connection can be healthy while BamDude's view of its status is not: besides the archive and the queue, BamDude keeps in memory the run it believes the printer is on. When a print ends while the link is down, the reconnect check closes it in the archive and the queue, but that in-memory run can stay behind — and then every next start on the printer is deferred before it is sent, again and again, while the printer and its queue both look idle. The panel shows A finished print is still held in memory ("The printer is free. Archive #123 has finished, but its context is still active.") and, beside it, A start keeps being deferred without progress with the number of attempts, how long it has lasted, the job, and a link to the row that holds the printer. A row appears once the same state has been seen twice, at least ten seconds apart. A start or completion that is simply still running is not a problem: it is listed only once it outlives the completion's own budget (about seven minutes), as an observation that System Health does not count. A stalled start that went quiet — after a repair, or with the queue paused — stays listed as inactive, with how long no attempt came, until the job starts or is gone. The panel says since when stalled starts are tracked (since BamDude last started) and how many records were dropped if the tracker filled up.
Release the finished context is offered only when that run is proven over: its archive finished on this printer and queue, the printer reports a fresh idle status, no start, completion, macro, smart-plug action, file download or bed cooldown still uses it, no plate swap is still owed for it (an unreadable record of one counts as owed), no layer timelapse of that print is still open — it would film the next print — and nothing newer began. Otherwise the row says what keeps it and offers no button. Releasing first pauses the printer's queue, then removes from memory only that run, its recorded start, and the macro selection and swap configuration its dispatch registered — the archive, accounting and the queue's status stay as they are, no command is sent to the printer, and the plate-clear check is left as it is. It is not a confirmation that the plate is clear: check the printer and the plate, then Resume queue yourself; the next pass starts the waiting job the ordinary way. A pause that was already there is named in the preview, and Resume lifts it too.
The dialog stays open on the result, as it is: released; not changed — the printer or its context changed after the preview, or BamDude could not check it again; nothing was released, the queue stays paused, no new start is scheduled under the pause, but a start that had already begun is not cancelled; or not recorded — check the printer's recovery history before doing anything else. For as long as the queue stays paused — after a reload or a restart, and even once the context is gone — a row on that printer says which release attempt paused it, when, and how it ended; Resume queue ends it. It is shown for information and System Health does not count it. The history shows each such repair as one entry with its result, or says the result is unknown, or that the process ended before a result was confirmed.
Residual preheat. A start refused after its preheat can leave heating requested. The row names it next to the fresh bed and chamber readings, or says they are unknown. It does not block the release, and neither the release nor the pause turns the heaters off — use the printer's own controls.
Health. The System Health section mentions how many print-state problems the background check currently sees, on how many printers, and links to these rows; it never offers a repair itself. A check that failed, or that has not yet covered every printer, says so instead of looking healthy. The support bundle carries the same bounded reading, limited to the printers the requesting API key may reach. Collect it before restarting BamDude: a restart clears the in-memory state that explains the stall.
Reading requires system:read, printers:read, queue:read_all and archives:read_all. Repairs additionally require queue:update_all and printers:control; an estimated end also requires archives:update_all, and deletion requires queue:delete_all. Releasing a finished context needs only queue:update_all beyond reading — it sends nothing to the printer. API-key printer restrictions apply to the list, each action and the Health mention.
GET /api/v1/system/print-state-issues
POST /api/v1/system/printers/{printer_id}/print-state/preview
POST /api/v1/system/printers/{printer_id}/print-state/apply
GET /api/v1/system/printers/{printer_id}/print-state/history
Closing a stopped print¶
When the action is offered
If the printer has stopped but its one proven job and archive still say printing, diagnostics can offer Close the stopped print. BamDude requires fresh, stable IDLE observations and refuses active effects, ambiguous ownership or a recorded completion. An offline printer alone is not sufficient evidence.
Check the physical printer and plate, confirm that it is idle, then choose Interrupted or Result unknown. Review the addressed preview and confirm it. Interrupted records become failed; an unknown result becomes cancelled and remains explicitly uncertain. Neither credits good output nor runs completion, filament accounting or table-swap actions. The archive and audit history stay; the queue remains paused and the plate-clear gate is unchanged. Inspect the result before deciding whether to retry or resume.
Apply repeats the identity and telemetry checks. A newer print or changed evidence invalidates the preview; it cannot close a successor execution.
A print on a printer with automatic plate swap can be closed this way too: the swap that was planned for after the print is dropped with it, because a print that did not complete owes no swap — check the plate yourself before you resume the queue. Only a swap command that was already claimed for this print (owed, sent or failed) keeps the action away. It never settles or replays a swap.
After applying, the dialog confirms the committed close and separately reports whether the old process context was released. A release failure leaves the close intact; check the current diagnostics to release any remaining terminal context separately. Repeating a request returns the saved close result without repeating context cleanup, so its release status is not inferred from history. Only the closed archive's in-memory usage session is discarded; a successor's or unproven session is left alone. The close itself charges no filament. With the session gone, AMS remaining-weight synchronization resumes as on any idle printer and may record the consumption the AMS reports, without linking it to the archive.
Duplicate queue claims after a restart¶
If the printer has finished but its queue still says Printing, use Print state diagnostics on the Information page and filter by printer ID. Changing the queue header to Idle alone does not release the execution claims or resolve an owed plate swap. Reconnecting is not a repair for conflicting persisted claims.
The updated recovery path rejoins a print already in progress when BamDude restarts, including a paused print. If it ends during reconnect, a delayed recovery callback does not create another print or clear the plate check. If the live run cannot be identified, the panel explains the uncertainty and preserves the records; it does not invent a completed print or offer a forced repair.
For old claims that refer to one ended execution:
- Check the actual printer and plate. Cancel stale claims is offered only with a fresh idle observation and established ownership of the complete group. A missing or conflicting archive, unfinished effects or more than 100 active claims prevents the action; there is no partial-group repair.
- If the panel shows The plate swap requires manual settlement, perform the missing physical work yourself: remove the print and prepare the plate and swap mechanism. Choose Record manual plate swap, confirm that the printer is idle and that you performed the work, then review and apply the preview. This records a manual settlement; BamDude does not send the old swap command. The action can be available even with automatic swap mode turned off.
- Choose Check again. Prepare a new preview for Cancel stale claims, confirm idle, review every affected row and Before → After, then confirm applying it. Only the named claims are cancelled; the archive outcome, filament/energy accounting, source files and pending jobs are preserved. The action is recorded in recovery history.
- Resolve any remaining finished context issue separately. The queue remains paused. Inspect the physical plate and any plate-clear request before resuming the queue yourself.
These cancelled claims describe an execution that must not be repeated through recovery. Retry, Clone, their bulk/batch variants and plate-clear Repeat cannot rearm them; cloning a batch containing such a claim is also refused. If you intentionally need another copy, review the execution archive and submit a new job through the normal print flow.
The existing read permissions above apply. Group cancellation also requires queue:update_all and printers:control; recording a manual swap additionally requires archives:update_all. If a blocker remains, keep its explanation and collect a support bundle instead of guessing which database rows to clear.
Queue leftovers¶
Queue leftovers lists queue rows that nothing will clean up any more. A finished row normally disappears when its print ends. A printer that confirms its plate keeps it until Clear plate or Repeat, and a held table swap keeps it as the record of the hold. Once another print has started on the same printer, neither can still happen, so the row — and the AutoQueue assignment that pointed at it — is only clutter. The panel also lists AutoQueue assignments whose printer job is gone.
BamDude removes these by itself when a printer reconnects and after each print finishes; the panel shows what is left and lets you remove it now. A row that may still be answered stays, with the reason: it is its queue's current job, the printer is waiting for a plate answer about it, its archive is not finished, its table swap is still owed, or the archive does not have its own copy of the file yet. Removing deletes only these queue records — archives, photos, accounting and print history stay, and nothing is sent to printers. Failed, cancelled and skipped jobs are never leftovers: they remain visible for review. Ordinary failed or cancelled jobs can offer Retry; the stale-claim recovery exceptions are described above.
Listing requires queue:read_all; removing requires queue:delete_all. A key limited to some printers sees and removes only those printers' rows, and never orphan assignments.
GET /api/v1/system/info # full system snapshot
GET /api/v1/system/storage-usage # bucketed storage breakdown
GET /health # unauthenticated liveness probe ({"status":"healthy"})
GET /api/v1/support/logs # tail of bamdude.log
DELETE /api/v1/support/logs # truncate the log file
GET /api/v1/support/debug-logging # current debug-logging state
POST /api/v1/support/debug-logging # toggle debug logging
GET /api/v1/support/bundle # download a support ZIP
POST /api/v1/settings/optimize-db # ANALYZE + WAL checkpoint + VACUUM
POST /api/v1/archives/search/rebuild-index # rebuild FTS index
GET /api/v1/updates/version # current version (unauthenticated)
GET /api/v1/updates/check # check GitHub for newer release
The unauthenticated /health is whitelisted by the setup-gate middleware, so you can scrape it before initial setup completes.