Exporting and restoring backups exposes private keys and validator configuration. Keep backups securely.
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.
Validator automated backups
To enable automated backups (only invalidator mode), call set auto_backup true on the MyTonCtrl console. These backups will be performed immediately after the node participates in the elections, ensuring that all data needed for the upcoming validation cycle is preserved. By default, automated backups are saved to /tmp/mytoncore/auto_backups/. Call set auto_backup_path <path> to change this path.
Automated backups older than 7 days are deleted automatically.
Standby node
It is recommended to maintain at least one standby node that can take over validation duties if the main machine fails. The standby machine should be hosted at a different physical location/ISP. It should have MyTonCtrl installed in full node mode and be synchronized with the TON Blockchain network. Hardware sizing should match main validator configuration. Usecreate_backup and restore_backup commands described below to transfer validator config to the standby machine.
Before transfering the validator configuration to the standby machine, make sure to stop or disable the TON node on the donor machine for approximately 20 minutes. Failure to follow this step may lead to connectivity issues and crashes on both the donor and target machines.
Create and retain a backup of standby node’s original configuration before applying or restoring a backup package from another machine. This backup is needed to revert the standby node back to standby mode.
create_backup
Purpose: Generate a compressed archive containing MyTonCtrl configuration, keyring, and validator data. Syntax-
Creates a snapshot of the following data:
-
Node configuration file located at (
/var/ton-work/db/config.json) -
Node keyring found in (
/var/ton-work/db/keyring) -
Node liteserver and console keys stored in (
/var/ton-work/keys) -
MyTonCtrl configuration database and related files located at (
~/.local/share/mytoncore) - Wallet and pool data
-
Node configuration file located at (
-
Validates the snapshot (ensures the config and database files deserialize) before compressing it into a
.tar.gz; defaults tomytonctrl_backup_<hostname>_<timestamp>.tar.gzunless you specifyfilename. -
Sets archive ownership back to the requested user (
-u) and removes the temporary snapshot when done, printingcreate_backup - OKor... - Errorbased on the helper script 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 operations as the specified system user (defaults to the current user).
- Unless you pass
--skip-create-backup, first runscreate_backupso you can roll back if the restore fails. - Stops
validatorandmytoncoreservices, and restores data from the backup, except for IP address, which will be updated accordingly. - On success, reloads MyTonCtrl’s local database, reinstalls BTC Teleport if validator mode is active, prints
restore_backup - OK, and exits so you can restart MyTonCtrl with the restored state.