/
batm-manage: the CAS CLI Toolkit

batm-manage: the CAS CLI Toolkit

The following commands are available to you (and essential) via the batm-manage script.

The "batm-manage" CAS CLI toolkit is automatically installed with CAS on your server.

Sudo (superuser/root) privileges are required on the server to use batm-manage.

Syntax:

sudo /batm/batm-manage [command]

Commands:

[command]

Description & Notes

[command]

Description & Notes

info

Displays the status of individual services and other information.

start master | admin | gate | all

Starts the selected service.

stop master | admin | gate | all

Stops the selected service.

log master | admin | gate

Displays the requested log.

log clear

Deletes all log files.

server-upgrade buildnumber

Downloads buildnumber from GB and upgrades your CAS. Downgrade is not possible.

terminal-upgrade buildnumber SN

Downloads and triggers a BATM firmware upgrade.

  • buildnumber is the firmware version,

    • don’t include any “.xx” point release.

  • SN is the BT# serial number (e.g. BT123456).

    • Upgrade multiple BATMs if desired;

    • separate serials with spaces (e.g. BT111 BT222).

dongle version serialno

Downloads and prepares dongle (door sensors) firmware.

  • version is supplied by Support.

  • serialno is the BATM serial number.

reboot serialno1 serialno2

Reboots the specified Terminal(s).

restore-point serialno1 serialno2

Creates a “restore point” for the specified Terminal(s) that will be automatically deployed if the Android system detects an issue with the firmware image.

  • Saves current firmware, Server IP, and Admin QR.

restore-terminal serialno1 serialno2

Restores a “restore point” for the specified Terminal(s).

vpn-generate serialno1 serialno2

Generates a VPN certificate for the specified terminal(s).

vpn-revoke serialno1 serialno2

Revokes the VPN key for the specified terminal(s).

vpn-clean

Clears and removes any generated VPN configuration.

  • Backup the following folders first:

    • /etc/openvpn

    • /batm/vpngen

See: https://generalbytes.atlassian.net/l/cp/H2MzgMY8

vpn-user-generate name email

Generates a VPN certificate and grants CAS VPN access to name @ email

vpn-user-revoke name

Deletes the VPN certificate and revokes CAS VPN access to name

terminal-unpair serialno

Force re-authorization of serialno BATM with CAS.

terminal-hwconf-clear serialno

clears the stored BATM HW configuration for serialno

acceptor billset serialno

Downloads and prepares an acceptor billset update for the BATM identified by serialno.

send crashlogs

Sends BATM Crash Logs to support when requested.

send serverlogs

Sends CAS Server Logs to support when requested.

send auditlogs

Sends auditlogs to support.

send payment fromaddress toaddress amount [fee]

Sends coin from internal wallet when "stuck".

  • Also see below: "show balances".

  • fee [optional] sets the specific forwarding fee for the entire transaction in BTC (not sats, nor “per byte”).

  • DO NOT INCLUDE the coin type (BTC, LTC, etc), the fee is just a number, including a decimal “.”.

wallet prefix

Generates new wallet with requested prefix.

  • May take a LONG time depending on the prefix size.

  • 2-3 characters (MAX) recommended.

  • Used for branding purposes only.

backup [options]

The current backup options are:

  • config,

  • app,

  • data,

  • vpn,

  • db,

  • batm-manage

Creates a backup of the server.

You may (optionally) specify what data to backup. The specified options must then be added in the proper order.

Providing no options will backup everything (default).

Example: batm-manage backup “data db”

  • only archives your data & database.

restore backupdir [options]

backupdir is required and points to a valid folder containing a backup.

The current restore options are:

  • config,

  • app,

  • data,

  • vpn,

  • db,

  • batm-manage

Restores a backup. You may (optionally) specify datatypes to avoid overwriting valid data. They must be specified in the proper order. Specifying no options will restore everything in the folder (default).

Example 1:

restore /batm/backup/20230323-151707-0400

  • Restores everything from the backup.

Example 2:

restore /batm/backup/20230323-151707-0400 "data db"

  • restores the data & db parts (only)

  • from the backupdir /batm/backup/20230323-151707-0400

export terminal serialno1 [serialno2]

Export terminals from server

  • The compressed file is saved at the current path,

    • e.g. /batm/BT123456.xml.gz

import terminal serialno.xml.gz [organizationName]

Import a terminal backup into the server, assigning it to the optional organizationName.

  • Use a fully qualified path for filename,

    • e.g. /batm/BT123456.xml.gz

  • Enclose organizationName in quotes,

    • e.g. sudo /batm/batm-manage import terminal BT123456.xml.gz “GB Demo”

Identical CAS versions required for import/export!

export identity organizationName <entriesPerFile>

Exports all Identity data, including images.

  • The compressed file is saved at the current path,

    • e.g. /batm/GBDemo_identities.xml.gz

  • Enclose organizationName in quotes:

    • e.g. batm-manage export identity “GB Demo”

  • optional entriesPerFile limits the number of Identities per file, which reduces each file’s size.

import identity filename.xml.gz <organizationName>

Imports all Identity data, including images, from an export file (see: export identity).

  • Use a fully qualified path for filename:

    • e.g. /batm/GBDemo_identities.xml.gz

  • Enclose organizationName in quotes:

    • e.g. ... import identity filename.xml.gz “GB Demo”

Identical CAS versions required for import/export!

reset-user user

Reset password & 2FA for user

Note the following password rules:

unban-ip ipaddress

Removes any IP login ban.

Unban your router’s IP - not your local IP.

unban-user username

Removes the specified username from ban list.

fg master | admin | gate

Starts the selected service in the foreground.

  • Service messages are displayed onscreen in real-time.

  • Useful for advanced troubleshooting.

license [newlicense]

Displays the current license, or updates the license key.

show balances BTC | LTC

Prints out any temporary wallets with non-zero balances.

  • Shows any BTC (or LTC) "stuck" on the server.

collect-photos [duration]

Collect photos from all Terminals (main cameras).

  • photos are taken only if the Terminal is idle.

  • “duration” is an integer timeout, e.g “30” would force all pictures to be taken & uploaded within 30 minutes. Longer periods result in greater chance of idle time - allowing the Terminals enough time to complete the requested task.

audit-fingerprints

Analyzes any fingerprint files. Reports point quality, enabling poor quality files to be removed from Identity files.

install-reverse-proxy

Installs the nginx reverse proxy server.

See: NGINX as a Proxy Server

heap-dump master | admin | gate

Dumps the java heap of the master or admin service

  • for development troubleshooting

sanitize all | old

Removes database records containing sensitive information

Related content

Copyright © 2020-2025 General Bytes USA LLC