Skip to main content

Backup and Restore

[edit on GitHub]

Warning

Chef Automate 4.x will not be available for download before the end of September 2022. We are working on making the upgrade process a seamless experience. Until then, you can download Chef Automate 3.0.49. Please get in touch with support for more information.

Backup

Chef Automate let’s you create a new backup. You can create it by running the backup command from a Chef Automate front-end node. The backup command is as shown below:

chef-automate backup create

Restore

This section includes the procedure to restore backed-up data of the Chef Automate High Availability (HA) using External File System (EFS) and the Amazon Web Services (AWS) S3 bucket.

Restore operation restores all the data while the backup is going on. The restore operation stops will the ongoing backup procedure. Let’s understand the whole process by a scenario:

  • Create a automate UserA and generate an API token named Token1 for UserA.
  • Create a backup, and let’s assume the back id to be 20220708044530.
  • Create a new user UserB and a respective API token named Token2.
  • Now, suppose you want to restore data in the same automate cluster. In that case, the data will only be stored for UserA with its token as the backup bundle only contains the UserA, and the UserB is not available in the backup bundle.

Restoring the S3 Backed-up Data

To restore backed-up data of the Chef Automate High Availability (HA) using the Amazon Web Services (AWS) S3 bucket, follow the steps given below:

  • Check the status of all Chef Automate and Chef Infra Server front-end nodes by executing the chef-automate status command.

  • Shutdown Chef Automate service on all front-end nodes

    • Execute sudo systemctl stop chef-automate command in all Chef Automate nodes
    • Execute sudo systemctl stop chef-automate command in all Chef Infra Server
  • Log in to the same instance of Chef Automate front-end node from which backup is taken.

  • Execute the restore command chef-automate backup restore s3://bucket_name/path/to/backups/BACKUP_ID --skip-preflight --s3-access-key "Access_Key" --s3-secret-key "Secret_Key".

  • Start all Chef Automate and Chef Infra Server front-end nodes by executing the sudo systemctl start chef-automate command.

Restoring the EFS Backed-up Data

To restore backed-up data of the Chef Automate High Availability (HA) using External File System (EFS), follow the steps given below:

  • Check the status of all Chef Automate and Chef Infra Server front-end nodes by executing the chef-automate status command.

  • Shutdown Chef Automate service on all front-end nodes

    • Execute sudo systemctl stop chef-automate command in all Chef Automate nodes
    • Execute sudo systemctl stop chef-automate command in all Chef Infra Server
  • Log in to the same instance of Chef Automate front-end node from which backup is taken.

  • Execute the restore command chef-automate backup restore <BACKUP-ID> --yes -b /mnt/automate_backups/backups --patch-config /etc/chef-automate/config.toml.

Restore
  • Start all Chef Automate and Chef Infra Server front-end nodes by executing the sudo systemctl start chef-automate command.
Restore Success

Was this page helpful?

×









Search Results