Articles in this section

How to run RestoreConfig and SaveConfig via Command Line?

In some rare cases, CalderaDock's RestoreConfig and SaveConfig may fail to operate correctly.

This guide provides instructions on how to run their scripts directly from the command line, bypassing the CalderaDock interface.

 

Running RestoreConfig

CalderaDock might fail in certain situations. Ensure that user permissions are consistent across the system.

 

Solution

  1. Navigate to the Restore Config Script Folder: Open your terminal and enter the following command:
    cd /Applications/caldera/CalderaDock.app/Contents/Resources/static/apps/restore-config/
  2. Run the Restore Config Script: Execute the script to parse the backup file:
    ./restore-config.sh path-to-back/backup.tgz

 

Running SaveConfig

SaveConfig, the backup script, is integrated into CalderaDock but can also be executed independently from the command line.

 

Script Location

The location of the SaveConfig script varies by operating system:

  • Mac OS:
    • /Applications/caldera/CalderaDock.app/Contents/Resources/resources/app/src/components/apps/save-config/save-config.sh
  • Linux:
    • /opt/CalderaDock.linux/resources/resources/app/src/components/apps/save-config/save-config.sh
    • /opt/CalderaDock.linux/resources/static/apps/save-config/save-config.sh

 

Parameters

To run SaveConfig from the terminal or within a script, you must specify parameters indicating where to save the archive and its name. Ensure you are in the correct directory where the script is located.

 

Basic Command

save-config.sh --output="/FolderName/FileName.tgz"

 

Including Drivers and Profiles

To include drivers and profiles in the backup, use the -f parameter:

save-config.sh -f --output="/FolderName/FileName.tgz"

 

Using Date and Time in the Filename

To generate a filename that includes the current date and time, use the following command:

save-config.sh -f --output="/home/caldera/Desktop/caldera-config_$(date +%y%m%d-%H%M).tgz"

 

Example Command

To create an archive on Linux that includes drivers and profiles, and save it to the desktop with the current date and time, use:

sudo /opt/CalderaDock.linux/resources/app/src/components/apps/save-config/save-config.sh -f --output="/home/caldera/Desktop/caldera-config_$(date +%y%m%d-%H%M).tgz"

 

Additional Information

The SaveConfig script can be executed without CalderaDock installed, which is useful for backing up data from older versions of CalderaRIP that may not support CalderaDock. However, please note that the script has not been tested with versions older than v10, and functionality may vary.

In some cases, macOS permissions might prevent CalderaDock from accessing files located in the Downloads folder. This issue arises because administrator privileges differ from root access and are less powerful:

macOS, file permissions.png

The problem can be resolved by granting read access to the "admin" user for the Downloads directory. For more information on managing file permissions, refer to Apple's support article.

  Warning

Before running the script, ensure you navigate to the directory where the script is located. Use the cd command to change directories. 

Example to go to the folder /home/caldera/Downloads/ on Linux: cd /home/caldera/Downloads/

Was this article helpful?
1 out of 1 found this helpful