Database backup
Backup to local
enforce_provisioning_action
- app.toml
# Log directory C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
dir = "C:\\Users\\admin\\AppData\\Local\\Temp\\log\\peppykeep"
# Log file name (full path: C:\\Users\\admin\\AppData\\Local\\Temp\\log\peppykeep\app.log)
file_name = "app.log"
# Level: error, warn, info, debug, trace Log level is debug (output all debug information)
level = "debug"
- bak.toml
# Backup type: database
bak_type = "db"
# Backups are also saved locally
bak_location_type = "local"
# Keep last n historical backups locally
history_bak_num = n
# Log level is debug mode (outputs the most detailed logs)
log_level = "DEBUG"
# Log directory C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
log_dir = "C:\\Users\\admin\\AppData\\Local\\Temp\\my_test_peppykeep\\logs"
# Local backup root C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
local_bak_home = "C:\\Users\\admin\\AppData\\Local\\Temp\\my_test_peppykeep\\backup"
# Local temp workspace C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
local_tmp_home = "C:\\Users\\admin\\AppData\\Local\\Temp\\my_test_peppykeep\\.tmp"
# The maximum length of the backup queue is 1 (serial execution, no concurrency)
max_bak_queue_size = 1
[mysql]
Database Host
mysql_ip = "localhost"
Database Port
mysql_port = 3306
Databse username
mysql_user_name = "ldbak_test"
Database Pass
mysql_pwd = "123456"
# mysqldump tool path
mysqldump_path = "/usr/local/bin/mysqldump"
# Docker Command Path (for containerized backups)
docker_cmd_path = "/usr/local/bin/docker"
# Backup Encryption Configuration
[backup_encryption]
# Turn off encryption
enabled = false
[mysql]
mysql_ip = "localhost"
mysql_port = 3306
mysql_user_name = "root"
mysql_pwd = "root"
# mysqldump tool path
mysqldump_path = "C:\\PROGRA~1\\MySQL\\MYSQLS~1.0\\bin\\mysqldump.exe"
skip_ssl = true
# docker_container_name = "non-exists-name" # When commenting on this line (None), the local mysqldump command is used, otherwise the docker exec command will be executed
# Docker Command Path (for containerized backups)
docker_cmd_path = "/usr/bin/docker"
- prj.toml
# Project identifiers for relative path and directory identification
prj_key = "test_717_file"
# Local data storage directory (temporary path, configurable)
data_dir = "C:\\test_data"
Perform the preliminary checks: § .
Open Terminal Execution
# Database Backup Precheck
peppykeep backup run --bak-type db --config-home %USERPROFILE%\.peppykeep\conf
When the pre-test is successful, the output is as follows:
=== Dry Run ===
Action : backup run
Project : test_717_file
BakType : Db
DataDir : C:\Users\admin\AppData\Local\Temp\my_test_peppykeep\data
Location : Local
Encryption : false
Force : false
Next : Re-run with --apply to execute.
Result
| Field | Description |
|---|---|
Action | Type of operation performed: backup run |
Project | Item identifier currently backed up: test_717_file |
BakType | Backup type: AppData (file only) |
DataDir | App data directory (data_dir in prj.toml) |
Location | Storage location: Local (local only) |
Encryption | Encryption enabled: false (no) |
Force | Force override: false (no) |
Next | Next Action Tip: Re-run with --apply to execute. (need to add --apply parameter to execute) |
Perform a backup
Performing a Database Backup
peppykeep backup run --apply --bak-type db --config-home %USERPROFILE%\.peppykeep\conf
After executing the backup command, the output on success is as follows:
=== Completed ===
Action : backup run
Project : test_717_file
BakType : Db
DataDir : C:\Users\admin\AppData\Local\Temp\my_test_peppykeep\data
Location : Local
Force : false
Artifact : C:\Users\admin\AppData\Local\Temp\my_test_peppykeep\backup\test_717_file\test_717_file-bak_20260703_103517.ppk
Status : Command completed successfully.
Result
| Field | Description |
|---|---|
Action | Type of action performed, fixed asbackup run |
Project | Identification of the currently backed up project, corresponding to prj_key in the project configuration file |
BakType | Backup data type: • Db — Backup database only• AppData — Backup file data only• DbAndAppData — Backup both database and file data |
DataDir | The data source directory for this backup, corresponding to data_dir in the project configuration |
Location | Storage location: • Local — store to local only• LocalAndRemote — store to both local and object storage object storage |
Force | Whether to enforce (ignore some checks or warnings), true/false |
Artifact | The full storage path of the local backup file, with the file name format {projectID} -bak_{datetime} .ppk |
Status | Execution status code: • Command completed successfully. — Backup successful• Command completed with errors. — Backup completed with errors (partial failure)• Command failed. — Backup execution failed |
Backup to Object Storage
enforce_provisioning_action
- app.toml
# Log directory C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
dir = "C:\\Users\\admin\\AppData\\Local\\Temp\\log\\peppykeep"
# Log file name (full path: C:\\Users\\admin\\AppData\\Local\\Temp\\log\\peppykeep/app.log)
file_name = "app.log"
# Level: error, warn, info, debug, trace Log level is debug (output all debug information)
level = "debug"
- bak.toml (S3 as an example)
# Backup type: database
bak_type = "db"
# Backups are also saved locally
bak_location_type = "local_and_remote"
# Keep last n historical backups locally
history_bak_num = n
# Log level is debug mode (outputs the most detailed logs)
log_level = "DEBUG"
# Log directory C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
log_dir = "C:\\Users\\admin\\AppData\\Local\\Temp\\my_test_peppykeep\\logs"
# Local backup root C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
local_bak_home = "C:\\Users\\admin\\AppData\\Local\\Temp\\my_test_peppykeep\\backup"
# Local temp workspace C:\\Users\\admin\\AppData\\Local\\Temp (subdirectories allowed)
local_tmp_home = "C:\\Users\\admin\\AppData\\Local\\Temp\\my_test_peppykeep\\.tmp"
# The maximum length of the backup queue is 1 (serial execution, no concurrency)
max_bak_queue_size = 1
# Enable Object Storage
[object_storage]
enabled = true
# Using S3 protocol (Backblaze B2 compatible)
provider = "s3"
# Bucket Name
bucket = "TestBucket"
# Object key prefix (like folder path)
prefix = "test_local"
# S3 Compatible Endpoints (Backblaze B2 + East)
endpoint = "https://s3.xxxxxxxxxxxxxx.com"
Region
region = "ca-east-006"
Access Key ID
access_key_id = "xxxxxxxxxxxxxx"
Access key
access_key_secret = "xxxxxxxxxxxxxx"
# Use path style URL (bucket/object instead of web hosting style)
path_style = true
# Backup Encryption Configuration
[backup_encryption]
# Turn off encryption
enabled = false
- prj.toml
# Project identifiers for relative path and directory identification
prj_key = "test_717_file"
# Local data storage directory (temporary path, configurable)
data_dir = "C:\\test_data"
Perform the preliminary checks: § .
Open Terminal Execution
# Database Backup Precheck
peppykeep backup run --bak-type db --config-home %USERPROFILE%\.peppykeep\conf
When the pre-test is successful, the output is as follows:
=== Dry Run ===
Action : backup run
Project : test_717_file
BakType : Db
DataDir : C:\Users\admin\AppData\Local\Temp\my_test_peppykeep\data
Location : LocalAndRemote
Encryption : false
Force : false
Next : Re-run with --apply to execute.
Result
| Field | Description |
|---|---|
Action | Type of operation performed: backup run |
Project | Item identifier currently backed up: test_717_file |
BakType | Backup type: Db (database only) |
DataDir | App data directory (data_dir in prj.toml) |
Location | Storage location: LocalAndRemote (Local + Object Storage) |
Encryption | Encryption enabled: false (no) |
Force | Force override: false (no) |
Next | Next Action Tip: Re-run with --apply to execute. (need to add --apply parameter to execute) |
Perform a backup
Performing a Database Backup
peppykeep backup run --apply --bak-type db --config-home %USERPROFILE%\.peppykeep\conf
After executing the backup command, the output on success is as follows:
=== Completed ===
Action : backup run
Project : test_717_file
BakType : Db
DataDir : C:\Users\admin\AppData\Local\Temp\my_test_peppykeep\data
Location : LocalAndRemote
Force : false
Artifact : C:\Users\admin\AppData\Local\Temp\my_test_peppykeep\backup\test_717_file\test_717_file-bak_20260703_112245.ppk
Bucket : VoosTestBucket
RemoteKey : test_local_voos/test_717_file/test_717_file-bak_20260703_112245.ppk
Provider : s3
Target : s3://VoosTestBucket/test_local_voos/test_717_file/test_717_file-bak_20260703_112245.ppk
LocalCleanup : applied
Status : Command completed successfully.
Result
| Field | Description |
|---|---|
Action | Type of operation performed: backup run |
Project | Item identifier currently backed up: test_717_file |
BakType | Backup type: Db (database only) |
DataDir | App data directory (data_dir in prj.toml) |
Location | Storage location: LocalAndRemote (Local + Object Storage) |
Force | Force override: false (no) |
Artifact | Local backup product path: C:\ Users\ admin\ AppData\ Local\ Temp\ my_test_peppykeep\ backup\ test_717_file\ test_717_file-bak_20260702_104919.ppk |
Bucket | Object Storage Bucket Name: VoosTestBucket |
RemoteKey | Object store stored file key-value path: test_local_voos/test_717_file/test_717_file-bak_20260702_104919.ppk |
Provider | Object storage storage provider: s3 |
Target | Object store full destination address: s3://VoosTestBucket/test_local_voos/test_717_file/test_717_file-bak_20260702_104919.ppk |
LocalCleanup | Local cleanup status: applied (executed) |
Status | Execution Status: Command completed successfully. (Command executed successfully) |