cfg_backup
Copy an existing configuration file to a timestamped backup (e.g., .bak-YYYYMMDD-HHMMSS) in the same directory or a specified backup directory, returning the backup path for later use with cfg_rollback.
Instructions
Copy config_path to a timestamped backup in a safe directory.
The backup name is <basename>.bak-YYYYMMDD-HHMMSS next to the
original (or in backup_dir when provided). Returns the backup
path so the caller can pass it to cfg_rollback later.
Parameters
config_path:
Absolute path of the existing config file. Must live in an
allowlisted directory (/tmp, /var/tmp, or $HOME;
override with OPENSIPS_MCP_OUT_DIR_ROOT).
backup_dir:
Optional destination directory for the backup copy. Default:
alongside the original file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config_path | Yes | ||
| backup_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||