Backup and Restore
Version
Linux Control Center = 2.10.X or higher
Requirements
SSH access to the LCC Host with root user
Overview
This guide provides information and step-by-step instructions for backing up and restoring the LCC
Objective
Demonstrate the complete backup and restore process of the LCC through the CLI interface.
Default Backup Directory
We strongly recommend that the generated backups be copied to a safe location, ensuring data preservation in case any intervention is necessary in the future.
Backup destination directory: /opt/lcc/bkp/
The configuration backup files will have a name in the format backup_config_YYYY-MM-DD_HH-MM-SS.tar.gz
, indicating the year, month, day, hour, minute and seconds in which the backup was created. These files contain the settings required for LCC to work.
The database backup file will be named in the format lcc_db_YYYY-MM-DD_HH-MM-SS.sql
, following the same pattern. This file stores the entire database, allowing complete recovery of the stored information.
Stopping Containers
Before performing the backup, it is necessary to stop the LCC Container processes separately for greater data integrity.
Container lcc_console Command:
docker stop lcc_console
Container lcc_worker Command:
docker stop lcc_worker
Container lcc_alert_report Command:
docker stop lcc_alert_report
See the example in the image below:
Backup Configuration Files
This command backs up all files with the
.yml
extension that were generated during installation. These files are essential for LCC to work.
Command: lcc-cli backup -a
The backup will be compressed in the tar.gz extension
The LCC database is encrypted, and within this compressed backup there will be a file called crypt.yml
, which is the key to decrypt during the restore.
Without this key, it will be impossible to restore the database.
Database Backup
To back up the LCC database, run the command below;
Command: lcc-cli database --backup
The backup will have the .sql extension with the date and time the backup creation command was executed.
Restoring Backup
Command: tar -xzvf file_name.tar.gz -C /
Command: lcc-cli database --restore file_name.sql
Check if you are using the correct backup and confirm by typing y and pressing enter
Starting the Containers
After the restoration is complete, run the commands to start the Containers.
Container lcc_console Command:
docker start lcc_console
Container lcc_worker Command:
docker start lcc_worker
Container lcc_alert_report Command:
docker start lcc_alert_report
See the example in the image below:
The LCC will be ready for use normally after the Containers are initialized.
Last updated