Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Project Profile Description (prj.toml)

This document defines project identification, applied data catalogs, MySQL library name and table filtering rules, and multi-level progressive retention policies for remote backups in object storage.

Configuration SegmentDescription
[local]Project Identification, Data Directory, Excluded Directory, Database Name and Table Filtering
[remote.retain]Remote Object Storage Retention and Cleanup Policy

The number of local historical backups is configured in [public] .history_bak_num of bak.toml.

[local]

ParameterDescriptionExample
prj_keyProject identifier, used for relative paths, directory names, and backup file prefixes."my-project"
data_dirApplication data directory to back up.See the platform path examples below.
excluded_data_dirsSubdirectories in data_dir that are excluded from backup.["caches", "log", "tmp"]
mysql_db_nameName of the MySQL database to back up."app_db"
include_table_listTables to back up exclusively; an empty array means no restriction.[]
exclude_table_listTables that are not backed up.[]

[remote.retain]

This section defines retention and cleanup policies for remote backups in object storage. max_get_object_count must be no less than the number of objects that may be retained; for an initial configuration, keep really_remove = false, review the cleanup plan and logs, then explicitly enable actual deletion.

ParameterDescriptionExample
minimum_retain_countMinimum number of backup copies to retain.3
minimum_retain_date_countNumber of recent days for which to retain every backup.3
days / months / yearsTimeline retention policy by day, month, and year.[1, 2, 3, 7] / 6 / [1, 2, 3]
really_removeWhether to actually delete remote objects beyond the retention rules.false

Platform path differences

Fields and retention policies are the same on every operating system; only data_dir uses the local path format.

Platformdata_dir example
Windows"C:\\Users\\<Username>\\AppData\\Local\\MyApp\\data"
macOS / Linux"/srv/myapp/data"

macOS / Linux:

[local]
prj_key = "my-project"
data_dir = "/srv/myapp/data"
excluded_data_dirs = ["caches", "log", "tmp"]
mysql_db_name = "app_db"
include_table_list = []
exclude_table_list = []

[remote.retain]
max_get_object_count = 100
minimum_retain_count = 3
minimum_retain_date_count = 3
days = [1, 2, 3, 7]
months = 6
years = [1, 2, 3]
really_remove = false

Windows:

[local]
prj_key = "my-project"
data_dir = "C:\\Users\\<Username>\\AppData\\Local\\MyApp\\data"
excluded_data_dirs = ["caches", "log", "tmp"]
mysql_db_name = "app_db"
include_table_list = []
exclude_table_list = []

[remote.retain]
max_get_object_count = 100
minimum_retain_count = 3
minimum_retain_date_count = 3
days = [1, 2, 3, 7]
months = 6
years = [1, 2, 3]
really_remove = false