Paths, backups and retention

Where files live, backups, and how long jobs and audit records are kept


Variable Choices/Defaults Comments
BACKUP_PATH
string
Default:
%PERSISTENT_FOLDER%/backups

Backup path
a valid directory path

Ansible Forms can backup the database and forms. This is the path where the backups are stored. The backup folder is created at first start if not present and a timestamp folder is created for each backup.

CONFIG_PATH
string
added in version 6.1.0
Default:
%PERSISTENT_FOLDER%/config.yaml

config.yaml path
a valid file path

The config.yaml file contains application configuration (categories, roles, constants).
Forms are not in this file : they are stored in the forms folder (FORMS_FOLDER_PATH).

FORMS_FOLDER_PATH
string
added in version 6.1.0
Default:
%PERSISTENT_FOLDER%/forms

Forms folder path
a valid directory path

The directory where individual form YAML files are stored. Forms can be organized in subdirectories within this folder.

FORMS_STAGING_PATH
string
added in version 6.1.0
Default:
%PERSISTENT_FOLDER%/forms_staging

Forms staging folder path
a valid directory path

When forms come from a git repository, a form created or edited in the designer is written here first and only lands in the repository once it is pushed. The loader reads this folder alongside the repository ones, so a staged form is usable immediately.

LOCK_PATH
string
Default:
%PERSISTENT_FOLDER%/ansibleForms.lock

Designer lock file path
a valid file path

Only 1 user can use the designer, so we use a locking file to hold the current owners information.

FORMS_BACKUP_PATH
string
added in version 4.0.3
Default:
%PERSISTENT_FOLDER%/forms_backups

Backup path for form backups
a valid directory path

When backups are made, they end up in this path

OLD_BACKUP_DAYS
number
added in version 4.0.3
Default:
60

Backup retention days
a whole number where 0 disables the cleanup

When backups are made, they are kept for this many days before being removed. This applies to form backups made through the designer (not database backups).

0 keeps every restore point, matching AUDIT_RETENTION_DAYS, JOB_RETENTION_DAYS and NIGHTLY_BACKUP_RETENTION. It used to mean the opposite here - everything older than a day was removed - while the status page reported it as “never”.

NIGHTLY_BACKUP_RETENTION
number
added in version 6.1.0
Default:
7

Nightly backup retention count
a whole number where 0 disables the cleanup

Number of automated nightly backups to retain. Ansible Forms automatically creates a full backup (database + config + forms) every night at midnight. Older nightly backups beyond this count are automatically deleted. Set to 0 to disable automatic cleanup (not recommended). Only backups that actually contain a usable database dump count towards this number, so a run of failed backups can never push a good one out.

AUDIT_RETENTION_DAYS
number
added in version 6.3.0
Default:
365

Audit trail retention in days
a whole number where 0 keeps every entry

How long entries in the audit trail are kept. The trail is append-only, so without a sweep it grows for ever; a daily task at 3:30 AM removes entries older than this. Set to 0 to keep everything.

JOB_RETENTION_DAYS
number
added in version 6.3.0
Default:
0

Job history retention in days
a whole number where 0 keeps jobs for ever

How long finished jobs and their output are kept. Job output can be large, so this is usually the fastest growing table in the database; the Status page reports its size. A daily task at 2:30 AM removes finished jobs older than this, together with their output. Only finished jobs are ever removed - a running job, or one awaiting approval, is kept however old it is. Defaults to 0, which means keep everything: upgrading must never silently delete job history, so switching this on is a deliberate choice.

HOME_PATH
string
added in version 3.0.0
Default:
OS Homedir path

The users home directory
a valid path

Ansible Forms generates an sshkey at first start, is one is not present, so you can have a git connection or other password-less connection.
Typically this key is stored in the users home-directory under /.ssh/id_rsa. You can set this homedirectory path manually with this property.

REPO_PATH
string
added in version 3.0.0
Default:
%PERSISTENT_FOLDER%/repositories

Repositories path
a valid path

This path is the root path for your local repositories, allowing you to integrate data with git repositories.

VARS_FILES_PATH
string
added in version 6.1.0
Default:
%PERSISTENT_FOLDER%/vars

Base path for vars files
a valid directory path

Base directory for resolving relative paths in form varsFiles property. Absolute paths in varsFiles are used as-is. Relative paths are resolved against this directory. Allows centralized management of shared variable files across forms.

ANSIBLE_PATH
string
Default:
%PERSISTENT_FOLDER%/playbooks

The path of the ansible playbooks (local instance)
a valid path

Ansible Forms can have a local ansible instance. This path says where the playbooks are.

UPLOAD_PATH
string
added in version 4.0.16
Default:
%PERSISTENT_FOLDER%/uploads

The path for file uploads
a valid path

Since 4.0.16, a new field type is introduced that allows file uploads. The files are uploaded in this path.

MYSQLDUMP_COMMAND
string
added in version 6.0.0
Default:
mariadb-dump --ssl-verify-server-cert=OFF

Database dump command
a valid mysqldump command

MySQL dump commands and MySQL/MariaDB flavours differ, hence the need for a configurable command.

MYSQL_COMMAND
string
added in version 6.0.0
Default:
mariadb --ssl-verify-server-cert=OFF

Database restore command
a valid mysql command

MySQL restore commands and MySQL/MariaDB flavours differ, hence the need for a configurable command.

BACKUP_COMMAND_TIMEOUT_SECONDS
number
added in version 6.3.0
Default:
3600

Backup/restore command timeout

How long the database dump and the database restore may run before they are killed. Both used to inherit the generic 60 second command timeout, which no real database can honour. Raise it if a large database is cut short; a restore that is killed part way leaves the database partially replayed, because the dump drops and recreates each table in turn.


Copyright © 2023-2026 AnsibleForms. All rights reserved.

This site uses Just the Docs, a documentation theme for Jekyll.