Management commands¶
atfinity supports a range of management commands to make administrating your installation easier.
They are executed via ./atfinity.sh COMMAND [OPTIONS].
Many commands accept a tenant id via -t TENANT_ID (or --tenant-id). When it is optional and omitted, the command usually applies to all tenants â check the description of the individual command below.
Version & status¶
Read-only commands to inspect the state of your installation.
display_version¶
Display the current version of the software.
-c TENANT_IDâ additionally display the current version of that tenant's configuration.
display_changes¶
Display a table with the number of configuration changes for all tenants.
-t TENANT_IDâ restrict the output to a single tenant.
case_overview¶
Display an overview of past and present cases, grouped by process. For clients with a fee based on the number of completed cases, we will ask you to send us the output of this command.
show_tenants¶
List all tenants in the system with their ids, titles and subdomains.
Users & access¶
Manage users, groups and roles. These commands share a common structure: the operation is selected with one of --list, --create, --update or --delete. They also accept:
-t TENANT_IDâ scope the operation to a single tenant.-f {text,json,csv}â output format (defaulttext).
users¶
Display and manage users.
users --list [--group GROUP] [--role ROLE] [--level LEVEL]â list all users, optionally filtered by group, role or level.users --create --email EMAIL --password PASSWORD --first-name FIRST_NAME --last-name LAST_NAME --initials INITIALS --level LEVEL [--add-groups GROUP] [--add-roles ROLE]â create a new user.users --update ...â update an existing user (same fields as create).users --delete --email EMAILâ remove a user.
groups¶
Display and manage user groups.
groups --list [-t TENANT_ID]â list groups.groups --create NAME -t TENANT_IDâ create a group.groups --delete NAME -t TENANT_IDâ delete a group.
roles¶
Display and manage user roles.
roles --list [-t TENANT_ID]â list roles.roles --create NAME -t TENANT_IDâ create a role.roles --delete NAME -t TENANT_IDâ delete a role.
Tenant lifecycle¶
Create, copy and delete tenants and their initial users.
create_tenant¶
Create a new tenant.
-s TENANT_SUBDOMAINâ subdomain for the new tenant (required).-t TENANT_TITLEâ display title for the tenant.
create_tenant_and_user¶
Create a new tenant together with an attached meta admin user.
-s TENANT_SUBDOMAINâ subdomain for the new tenant (required).-u USER_EMAILâ email (username) of the meta admin user.-p PASSWORDâ password for the meta admin user.-t TENANT_TITLEâ display title for the tenant.
create_user (deprecated)¶
Create a new meta admin user within the given tenant. If the user already exists, their password is reset and their meta admin status is updated. Prefer users --create for new installations.
-u USER_EMAILâ email (username) of the user (required).-p PASSWORDâ password (required).-t TENANT_IDâ tenant the user belongs to (required).--meta_adminâ grant meta admin rights.
copy_tenant¶
Create a copy of an existing tenant, including its configuration, under a new title and subdomain.
-t TENANT_IDâ id of the tenant to copy (required).-n TITLEâ title of the new tenant (required).-s SUBDOMAINâ subdomain of the new tenant (required).
delete_tenant¶
Delete the tenants with the given ids. Accepts one or more ids.
TENANT_ID1 [TENANT_ID2 ... TENANT_IDN]â ids of the tenants to delete.
Configuration¶
Export and import a tenant's configuration as an .atc file. Use these to move a configuration between environments (for example from a staging to a production installation).
export_configuration¶
Export the configuration of a single tenant as an .atc file.
-o OUTPUT_PATHâ target path for the export (defaultconf_export.atc).-t TENANT_IDâ tenant to export (default1).
import_configuration¶
Import an .atc configuration file into a tenant.
INPUT_PATHâ path to the.atcfile to import (required).-t TENANT_IDâ target tenant (default1).
Backup (data & files)¶
Export and import the full database and files as a .zip. Unlike the configuration commands, these cover all data â cases, instances and files â and are meant for backups and full-installation transfers.
zip_export¶
Export all current data and files to a .zip. The archive appears in the /import folder.
-o /import/data_and_files_export.zipâ target path for the archive.--no_filesâ export data only, without files.
zip_import¶
Clear the current database and import a .zip containing data and files. The archive is first copied into a shared folder with the docker container and then imported.
ZIP_FILE_TO_IMPORTâ path to the archive to import (required).
Search & reindexing¶
Rebuild or clear the search indices. Run these after bulk data changes, after an import, or when search results look stale.
reindex¶
Reindex configuration, cases and instances for the whole installation.
reindex_cases¶
Reindex all cases.
-t TENANT_IDâ restrict to a single tenant (default: all tenants).
reindex_instances¶
Reindex all instances.
-t TENANT_IDâ restrict to a single tenant (default: all tenants).
reindex_cases_and_instances¶
Reindex cases and instances.
-t TENANT_IDâ restrict to a single tenant (default: all tenants).--delete_conf_indicesâ also delete the configuration indices before reindexing.
delete_indicies¶
Delete the case and instance search indices.
-t TENANT_IDâ restrict to a single tenant (default: all tenants).
Case & data maintenance¶
Recalculate, invalidate or delete case and instance data.
Warning
The delete commands in this section are destructive and cannot be reverted. Make sure you have a backup (see Backup) before running them.
invalidate_cases¶
Invalidate all cases for all tenants. This forces the rule engine to recalculate every case and its results the next time the case is opened.
recalculate_case¶
Recalculate a single case immediately.
-c CASE_IDâ id of the case to recalculate (required).
delete_all_cases_and_instances¶
Delete all cases and instances for a specific tenant. Configuration is not affected.
-t TENANT_IDâ tenant whose case and instance data is deleted (required).
delete_all_data¶
Delete all case and instance data for all tenants in the database.
clear_admin_logs¶
Delete all admin logs from the database for the given tenant. This cannot be reverted.
-t TENANT_IDâ tenant whose logs are cleared.
File & task cleanup¶
Remove stale tasks and files. We recommend running the cleanup commands periodically.
remove_old_tasks¶
Delete celery tasks (and their attachments) older than a week. We recommend running this periodically.
mark_unused_files¶
Mark all unused files with the prefix unused_ so they can be reviewed before deletion.
-t TENANT_IDâ restrict to a single tenant.-aâ apply to all tenants.
delete_unused_files¶
Delete all files that are not referenced by any data. Typically run after mark_unused_files.
-t TENANT_IDâ restrict to a single tenant.-aâ apply to all tenants.-d DAYS_AGOâ only delete files that were marked more thanDAYS_AGOdays ago.
remove_pdfs_without_files¶
Delete all PDFs that do not have a file attached.
Notifications¶
disable_all_notifications¶
Disable all notifications for the given tenant.
-t TENANT_IDâ tenant whose notifications are disabled (required).