Backup/Restore Configuration
You may find it necessary to backup your nodectl configuration file from time to time.
In the event that your configuration becomes corrupt, restoring from a recent backup can save time.
What is your configuration?
nodectl is reliant on being able to read and process a configuration file that holds persistent configuration elements that allow nodectl to properly assist in administrating your node.
For Example:
- Holds your p12 private keystore details that are utilized to authenticate and validate data on the node.
- Holds the details necessary to administer the Hypergraph or metagraph cluster your node is running on, in defined profiles.
- Holds parameters necessary to run various nodectl features.
Backing up your configuration
Execute the backup_config
command on your node.
Backup Step One
nodectl will begin the process of finding your configuration file and creating a dated copy in the configured backup directory.
Backup Process Results
Backing up configuration ...................... complete
We will presented with detailed information explaining when, where, and what was backed up.
- The file was backed up on
2024-04-17
. - The file is located in the
/var/tessellation/backups
directory on the node. - The name of the backup is called
backup_cn-config_2024-04-17-11:56:13Z
. - Time Stamps are in UTC
Backup Location: /var/tessellation/backups/
Backup File Name: backup_cn-config_2024-04-17-11:56:13Z
In this example the auto_restart feature was enabled:
- Since a backup request does not require the
auto_restart
feature to be disabled to complete, it was running while the backup was created. - The pid (process id) for the
auto_restart
feature was found, so no action was needed and theauto_restart
feature was not restarted (it was already running).
nodeadmin@Constellation-Node:~$
Restoring your configuration
In the event our node started to issue an error on startup, some unknown event took place that may have corrupted the configuration, or any other reason that may require you restore you configuration, you can use nodectl's built in restore feature.
nodectl will access the backup directory on your node, identify the backup files, and display a list of backup files available for restoration.
Note
The only files that will be displayed are those files that are named in a particular format that nodectl can understand.
This is the format that nodectl uses during the creation of the backups.
=Â Â Â CONSTELLATION NETWORK HYPERGRAPHÂ Â Â =
=Â Â Â Â Â Â RESTORE CONFIGURATION FILEÂ Â Â Â Â Â =
=Â Â Â Â Â Â Â Â Â Â Â Â Â Â FROM BACKUPSÂ Â Â Â Â Â Â Â Â Â Â Â =
========================================
Code Name: Princess Warrior
WARNING
Restoring the wrong configuration or a configuration from a previous version of nodectl that is not in the current upgrade path may cause nodectl to malfunction.
Proceed with caution!
Please choose a date time option:
1) 2024-03-07 - 14:19:45 backup
2) 2024-04-17 - 11:56:13 backup
3) cancel operation
Enter an option and hit the <enter> key
:
In our example, we will choose 2+enter to restore the file from 2024-04-17
at 11:56:13
UTC time.
Confirm
We will be presented with a confirmation before the restoration is executed.
Danger
Once the new configuration file is put in place, if there are issues with the restoration, you not be able to utilize nodectl properly.
During every restoration, another current backup is automatically created. This may be used in the event of any unexpected issues. We can restore again to the last known good configuration.
We will press y+enter
2024-04-17 - 11:56:13 backup
/var/tessellation/backups/cn-config.2024-04-17-11:56:13Zbackup.yaml
Are you SURE you want to restore? [n]: y
Restore
The restoration will commence, and we will be returned to the node's prompt upon completion.
restoring config .............................. complete
configuration restored!
nodeadmin@Constellation-Node:$
Alternative Restoration
If you do not have a highly customized configuration file in use on your node, and a restoration does not restore your ability to use nodectl, you have an alternative solution to regain proper usage of nodectl.
Utilizing the new
feature in the configurator.
You may also be able to restore a corrupted configuration through the use of overwriting your configuration with a new configuration file and then modifying your profile and global p12 credentials.
Follow the prompts to build a new configuration using SCENARIO 4
.