The backup process failed because a required environment variable is either missing or incorrectly set. Environment variables are crucial for the backup script to locate the necessary resources, credentials, or configurations. If the variable is absent or contains incorrect data, the script can't proceed as expected, leading to the failure of the backup.
Steps to reproduce
The first step involves setting up the web server. You successfully install the web server on your system using
Set SFTPGo Port: You define the SFTPGo service port in the server configuration, ensuring that it will listen on the correct port for secure file transfers.
Create a Virtual Host (vHost): You configure a virtual host to serve specific content or applications. This virtual host might point to a particular domain or subdomain and handle the routing of HTTP/S requests accordingly.
You then configure a backup instance, specifying the module that needs to be backed up.
With the backup instance configured, you trigger the backup process. The backup completes successfully, confirming that all specified data and configurations have been safely stored.
The backup operation reports success. All files, settings, and configurations, including the SFTPGo settings and virtual host configurations, are successfully saved to the backup instance.
After verifying the successful backup, you proceed to uninstall or remove the web server module. This step simulates a scenario where the server or its configurations might be lost or corrupted, necessitating a restore from backup.
Following the removal of the web server, you initiate the restoration process using the backup created earlier. The restoration process begins, and the system attempts to restore all configurations, files, and settings.
However, during the restoration, an error occurs. The restoration process fails because one or more environment variables required for the restoration are either missing or incorrectly formatted. Specifically, it appears that an environment variable related to SFTPGo's port configuration has split or gone out of range, causing the process to halt.
Additionally, after the partial restoration, you notice that the toggle for enabling external access to SFTPGo, which was originally enabled before the backup, is now disabled.
Expected behavior
I expect no errors during the restoration process; all properties and configurations must be restored exactly as they were set before the backup. This includes ensuring that environment variables are correctly set, all toggles (like the external SFTPGo access) remain in their pre-backup state, and any other settings or configurations are fully restored without discrepancies.
Actual behavior
An error occurred during the restoration because an environment variable related to the SFTPGo configuration was improperly handled, causing it to be out of range. This issue disrupted the restoration, leading to incorrect settings, such as the external SFTPGo access toggle being disabled despite being enabled before the backup. Proper handling of environment variables is essential to ensure all settings are restored accurately.
The backup process failed because a required environment variable is either missing or incorrectly set. Environment variables are crucial for the backup script to locate the necessary resources, credentials, or configurations. If the variable is absent or contains incorrect data, the script can't proceed as expected, leading to the failure of the backup.
Steps to reproduce
The first step involves setting up the web server. You successfully install the web server on your system using
Set SFTPGo Port: You define the SFTPGo service port in the server configuration, ensuring that it will listen on the correct port for secure file transfers.
Create a Virtual Host (vHost): You configure a virtual host to serve specific content or applications. This virtual host might point to a particular domain or subdomain and handle the routing of HTTP/S requests accordingly.
You then configure a backup instance, specifying the module that needs to be backed up.
With the backup instance configured, you trigger the backup process. The backup completes successfully, confirming that all specified data and configurations have been safely stored.
The backup operation reports success. All files, settings, and configurations, including the SFTPGo settings and virtual host configurations, are successfully saved to the backup instance.
After verifying the successful backup, you proceed to uninstall or remove the web server module. This step simulates a scenario where the server or its configurations might be lost or corrupted, necessitating a restore from backup.
Following the removal of the web server, you initiate the restoration process using the backup created earlier. The restoration process begins, and the system attempts to restore all configurations, files, and settings.
However, during the restoration, an error occurs. The restoration process fails because one or more environment variables required for the restoration are either missing or incorrectly formatted. Specifically, it appears that an environment variable related to SFTPGo's port configuration has split or gone out of range, causing the process to halt.
Additionally, after the partial restoration, you notice that the toggle for enabling external access to SFTPGo, which was originally enabled before the backup, is now disabled.
Expected behavior
I expect no errors during the restoration process; all properties and configurations must be restored exactly as they were set before the backup. This includes ensuring that environment variables are correctly set, all toggles (like the external SFTPGo access) remain in their pre-backup state, and any other settings or configurations are fully restored without discrepancies.
Actual behavior
An error occurred during the restoration because an environment variable related to the SFTPGo configuration was improperly handled, causing it to be out of range. This issue disrupted the restoration, leading to incorrect settings, such as the external SFTPGo access toggle being disabled despite being enabled before the backup. Proper handling of environment variables is essential to ensure all settings are restored accurately.
Components
webserver:1.0.18
See also
https://community.nethserver.org/t/full-disaster-recovery-findings/24241
thank Eddie Atherton