Skip to main content
Skip table of contents

MicroK8s backup and restore

Backing up and restoring DCT data on MicroK8s involves the following steps, which help ensure data integrity and availability, especially when using hostpath volume mounts.

Backup

  1. Determine which data or directories need to be backed up. This could include database files, application state, configuration files, and any other critical data.

  2. Example command to backup a DCT data directory:

    CODE
    sudo cp -r /var/snap/microk8s/common/default-storage/dct-data /path/to/backup/location/dct-data-backup
    1. For Hostpath Volumes: Navigate to the directory where the hostpath volumes are stored on your MicroK8s node. Use standard file system operations to copy the relevant directories and files to a backup location. This could be an external storage device or a remote backup service.

Restore

  1. Ensure the DCT services that use the data are temporarily stopped to prevent data corruption during the restore process.

  2. Example command to restore DCT data from backup:

    CODE
    sudo cp -r /path/to/backup/location/dct-data-backup /var/snap/microk8s/common/default-storage/dct-data
    1. For Hostpath Volumes: Copy the backup data back into the original hostpath volume directory. Ensure that file permissions and ownership are correctly set to match the requirements of your DCT deployment.

  3. Once the data is restored, restart the DCT services to make sure they are recognized and utilize the restored data.

Schedule regular backups of critical data to reduce the risk of significant data loss.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.