Overview — what it does
The Script Builder generates and guides a backup script so an SE can understand, review and place it in crontab. It generalizes the legacy mysqldump auto-generation + report callback.
How to use
- Define a job (
infr_backup_job): target service · kind (db/web/custom) · schedule · storage target. - Generate a script from a template + job params →
infr_generated_script(body + crontab line).
# mysqldump with credentials hidden via --defaults-extra-file (never on the CLI)
mysqldump --defaults-extra-file=/etc/infr/{ident}.cnf --routines --opt --events \
{db} {tables} -h{host} > {target}/{ident}_$(date +%Y%m%d%H%M).sql
- Place the script on the target host and register the crontab line (the app does not write remote crontab).
Schedule grammar "N U" — U ∈ M(minute) / H(hour) / D(day) / W(week), e.g.
6 H.next_run_at = start_at + interval, viaApp\Support\ScheduleGrammar.
Data sources
infr_script_template·infr_backup_job·infr_generated_script·App\Support\ScheduleGrammar
Access
Read/write level≥2.
Related
