Exporting and restoring backups exposes private keys and validator configuration.
Risk: key leakage allows account takeover; config mistakes can halt validation.
Scope: this node’s keys and validator state.
Rollback: create a fresh backup first; you can restore it if needed.
Environment: test on TON Testnet before using on TON Mainnet.
Operational notes
- Backups capture MyTonCtrl data, validator config, and keyring files. Always store backup archives securely (they contain private keys).
- Restoration overwrites existing configuration. Ensure the donor node is offline before restoring its backup to avoid data divergence.
- Both scripts expect
sudoor equivalent privileges when manipulating system files. Use the-uflag to match the original install user if necessary.
create_backup
Purpose: Generate a compressed archive containing MyTonCtrl configuration, keyring, and validator data. Syntax- Exports the validator keyring via
exportallprivatekeys, captures the currentconfig.json, and stages them in a temporary directory. - Invokes
scripts/create_backup.shwith:-mpointing to the MyTonCtrl working directory (usually/var/ton-work).-treferencing the temporary snapshot directory.- Optional
-d <filename>when you supplyfilename; otherwise the script chooses its own name. - Optional
-u <user>to run the backup script as a specific system user (defaults to the effective user).
- Removes the temporary directory afterwards and prints
create_backup - OKor... - Errorbased on the script’s exit code.
restore_backup
Purpose: Restore a previously created backup archive into the current node environment. Syntax- Requires the backup archive filename. Optional flags:
-yskips the interactive confirmation prompt.--skip-create-backupprevents MyTonCtrl from making a safety backup of the current state before restoring.-u <user>runs the restore script as the specified system user (defaults to the current user).
- Without
--skip-create-backup, first callscreate_backupwith default arguments so you can roll back if needed. - Resolves the node’s IP address, then runs
scripts/restore_backup.shwith-m <work_dir>,-n <filename>,-i <node_ip>(converted to integer form). - If restoration succeeds and validator mode is active, reinitializes BTC Teleport to ensure the service still matches the restored state.
- Exits MyTonCtrl after a successful restore so you can restart with the new configuration.