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

Docker Backup

Backup to local

enforce_provisioning_action

  1. 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"

点击查看详情

  1. bak.toml
# Backup type is docker backup
bak_type = "db_and_app_data"

# 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

# Backup Encryption Configuration
[backup_encryption]
# Turn off encryption
enabled = false

[mysql]
mysql_ip = "127.0.0.1"
mysql_port = 3306
mysql_user_name = "root"
mysql_pwd = "root"
# mysqldump tool path
mysqldump_path = "/usr/bin/mysqldump"
skip_ssl = true
docker_container_name = "ppk-mysql-test"
docker_cmd_path = "C:\\Users\\admin\\AppData\\Local\\Programs\\DockerDesktop\\resources\\bin\\docker.exe"

点击查看详情

  1. 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

# docker Backup Precheck (Database + App Catalog)
peppykeep backup run --bak-type db-and-app-data --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    : DbAndAppData
DataDir    : C:\test_data
Location   : Local
Encryption : false
Force      : false
Next       : Re-run with --apply to execute.

Result

FieldDescription
ActionType of operation performed: backup run
ProjectIdentification of the currently backed up item
BakTypeDbAndAppData means that both MySQL and App Catalog in the container are backed up
DataDirApp Data Catalog
LocationStorage Location
EncryptionWhether encryption is enabled
ForceWhether to enforce
NextFormal execution after adding `--apply’

Perform a backup

Perform a docker backup

peppykeep backup run --bak-type db-and-app-data --apply --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      : DbAndAppData
DataDir      : C:\test_data
Location     : Local
Force        : false
Artifact     : C:\\Users\\admin\\AppData\\Local\\Temp\\backup\\peppykeep\\test_717_file\\test_717_file-bak_20260730_111043.ppk
ArtifactSize : 1.2 KiB
Encrypted    : false
UploadTarget : <none>
Status       : Command completed successfully.

Result

FieldDescription
ActionPin to backup run
ProjectIdentification of the currently backed up item
BakTypeDbAndAppData — Backup both MySQL and App Catalog in the container
DataDirApp Data Catalog
LocationStorage Location
ArtifactLocal backup file path
StatusExecution status

Backup to Object Storage

enforce_provisioning_action

  1. 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"

点击查看详情

  1. bak.toml
# Backup type is docker backup
bak_type = "db_and_app_data"

# 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

# Backup Encryption Configuration
[backup_encryption]
# Turn off encryption
enabled = false

[mysql]
mysql_ip = "127.0.0.1"
mysql_port = 3306
mysql_user_name = "root"
mysql_pwd = "root"
# mysqldump tool path
mysqldump_path = "/usr/bin/mysqldump"
skip_ssl = true
docker_container_name = "ppk-mysql-test"
docker_cmd_path = "C:\\Users\\admin\\AppData\\Local\\Programs\\DockerDesktop\\resources\\bin\\docker.exe"

点击查看详情

  1. 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

# docker Backup Precheck (Database + App Catalog)
peppykeep backup run --bak-type db-and-app-data --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    : DbAndAppData
DataDir    : C:\test_data
Location   : LocalAndRemote
Encryption : false
Force      : false
Next       : Re-run with --apply to execute.

Result

FieldDescription
ActionType of operation performed: backup run
ProjectIdentification of the currently backed up item
BakTypeDbAndAppData means that both MySQL and App Catalog in the container are backed up
DataDirApp Data Catalog
LocationLocalAndRemote
EncryptionWhether encryption is enabled
ForceWhether to enforce
NextFormal execution after adding `--apply’

Perform a backup

Perform a docker backup

peppykeep backup run --bak-type db-and-app-data --apply --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      : DbAndAppData
DataDir      : C:\test_data
Location     : LocalAndRemote
Force        : false
Artifact     : C:\\Users\\admin\\AppData\\Local\\Temp\\backup\\peppykeep\\test_717_file\\test_717_file-bak_20260730_113436.ppk
ArtifactSize : 1.2 KiB
Encrypted    : false
Provider     : s3
Bucket       : VoosTestBucket
RemoteKey    : test_717_file/test_717_file-bak_20260730_113436.ppk
UploadTarget : s3://VoosTestBucket/test_717_file/test_717_file-bak_20260730_113436.ppk
LocalCleanup : applied
Status       : Command completed successfully.

Result

FieldDescription
ActionType of operation performed: backup run
ProjectIdentification of the currently backed up item
BakTypeDbAndAppData
ArtifactLocal Backup Product Path
Bucket / RemoteKey / UploadTargetObject Storage Upload Destination
LocalCleanupLocal History Cleanup Status
StatusExecution status