Skip to content

Conversation

@hacker-volodya
Copy link
Member

Closes #1348

@github-actions
Copy link

To fix the formatting issues:

  1. Install necessary dependencies: npm ci
  2. Then, run this command:
npx remark -o --silent --silently-ignore ecosystem/node/mytonctrl/backups.mdx 

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates here—I've left several suggestions in ecosystem/node/mytonctrl/backups.mdx to better align the backup documentation with the style and safety guidance; please apply the inline suggestions.


## Validator automated backups

To enable automated backups (only in `validator` 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Non-compliant placeholder name in automated backup command

The new automated-backup paragraph introduces the placeholder <path> in the command “Call set auto_backup_path <path> to change this path.”. The placeholder guidelines in contribute/style-guide-extended.mdx §13.5 require descriptive <ANGLE_CASE> names such as <WALLET_ADDR> or <RPC_URL>, and they are intended to be defined at first use. Using a generic, lower-case <path> makes it less obvious what value belongs there and is inconsistent with the documented placeholder pattern.

Suggested change
To enable automated backups (only in `validator` 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.
To enable automated backups (only in `validator` 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 <AUTO_BACKUP_PATH>` to change this path (`<AUTO_BACKUP_PATH>` is the directory where automated backups are stored).

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!


- Wallet and pool data

- Validates the snapshot (ensures the config and database files deserialize) before compressing it into a `.tar.gz`; defaults to `mytonctrl_backup_<hostname>_<timestamp>.tar.gz` unless you specify `filename`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Second-person reference in backup filename behavior

The behavior bullet at line 58 ends with “unless you specify filename.”, which uses the second-person pronoun “you” to refer to the reader. Section 5.8 of the style guide forbids using “you/your” for readers and “we/I/our” for authors, requiring neutral, fact-based phrasing instead. This sentence can describe the conditional behavior of the filename parameter without addressing the reader directly. Adjusting the clause maintains meaning while complying with the pronoun rule.

Suggested change
- Validates the snapshot (ensures the config and database files deserialize) before compressing it into a `.tar.gz`; defaults to `mytonctrl_backup_<hostname>_<timestamp>.tar.gz` unless you specify `filename`.

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

- 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.
- `-u <user>` runs the restore operations as the specified system user (defaults to the current user).
- Unless you pass `--skip-create-backup`, first runs `create_backup` so you can roll back if the restore fails.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Second-person pronoun in restore backup safeguard

The restore behavior bullet at line 85 reads “so you can roll back if the restore fails.”, directly addressing the reader with “you”. This violates the style guide’s rule that documentation must not refer to the reader using “you” or “your”, even when describing safeguards. The intent is to describe system behavior and capabilities in neutral terms. Rephrasing the clause to focus on the state and what can be restored keeps the meaning clear while removing the prohibited pronoun.

Suggested change
- Unless you pass `--skip-create-backup`, first runs `create_backup` so you can roll back if the restore fails.

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

- `-u <user>` runs the restore operations as the specified system user (defaults to the current user).
- Unless you pass `--skip-create-backup`, first runs `create_backup` so you can roll back if the restore fails.
- Stops `validator` and `mytoncore` services, 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Second-person pronoun in MyTonCtrl restart description

The final restore behavior bullet at line 87 concludes with “and exits so you can restart MyTonCtrl with the restored state.”, again using “you” to address the reader. Under the style guide’s “Don’t get personal” rule, documentation must not use “you/your” for readers and should instead describe outcomes from the system’s perspective. Here the text is clearly describing the state of MyTonCtrl after a successful restore, which can be framed without a direct second-person reference. Neutral phrasing preserves the meaning while aligning with the pronoun restriction.

Suggested change
- 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.

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MyTonCtrl] Integrate old guides on backup

2 participants