Skip to content

Support backup and restore commands for FAIR nodes - #141

Merged
dmytrotkk merged 13 commits into
developfrom
support-backup-and-restore-for-fair-nodes
Sep 18, 2025
Merged

dmytrotkk merged 13 commits into
developfrom
support-backup-and-restore-for-fair-nodes

Conversation

@alexgex

@alexgex alexgex commented Sep 17, 2025 •

Copy link
Copy Markdown
Contributor

This pull request refactors and improves the Ansible playbooks and roles for backing up and restoring SKALE and FAIR nodes. The changes introduce stricter validation of node types, make command execution generic for both SKALE and FAIR nodes, and improve playbook structure and task usage. The updates help prevent misconfiguration and ensure that backup and restore operations are only performed on supported node types.

Validation and Safety Improvements:

  • Added validation tasks to ensure the node_type variable is defined and set to either 'skale' or 'fair' before proceeding with backup or restore operations in node_backup and node_restore roles, and in sChain playbooks [1] [2] [3].
  • Added validation to sChain backup and restore playbooks to ensure node_type is 'skale' [1] [2].

Generic Node Command Handling:

  • Refactored command construction to use a node_cmd_prefix variable, enabling commands to run for both SKALE and FAIR nodes [1] [2] [3] [4] [5].

Playbook and Task Structure Enhancements:

  • Updated playbooks and roles to use import_tasks/include_tasks instead of deprecated include statements, and improved tagging for easier task selection [1] [2] [3].
  • Added connection: local and gather_facts: false to sChain playbooks for clarity and performance [1] [2].

Backup and Restore Logic Improvements:

  • Improved logic for selecting the latest backup file using a more robust sorting method.
  • Ensured config-only restore is only available for SKALE nodes and not for FAIR nodes.

Deprecated Playbooks Removal:

  • Removed old playbooks (backup.yaml, restore.yaml) and their imports to streamline the workflow and avoid confusion [1] [2].

@alexgex alexgex linked an issue Sep 18, 2025 that may be closed by this pull request
@dmytrotkk
dmytrotkk merged commit d5f0489 into develop Sep 18, 2025
@dmytrotkk
dmytrotkk deleted the support-backup-and-restore-for-fair-nodes branch September 18, 2025 17:28
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.

Add support for backup and restore of FAIR nodes

2 participants