1 Introduction
This document describes how to create a backup of the Atlas configuration for the Cloud Execution Environment (CEE).
The script that creates the backup is invoked by the atlas backup-create command. For more information about the atlas command and its subcommands, refer to the Atlas Software Management Guide.
1.1 Prerequisites
This section describes the prerequisites which must be fulfilled before a backup of the Atlas configuration files can be taken.
1.1.1 Conditions
Before the backup procedure can be performed, the following conditions must apply:
- The user must have root access to be able to run the atlas command.
- The location of a predefined persistent storage must be known.
2 Basic Concepts
The Atlas configuration backup is generated by using the atlas command, executed on the Atlas Virtual Machine (VM). The generated backup contains key configuration files. The backup can be used to restore the Atlas configuration to a previous state, if needed.
A directory is created for each backup in /var/archives. The directory name consists of the default or a user-given name and the date. An example of a backup directory name is AtlasBackup1471858645. The backup directory consists of several files. Only the following information is stored as Atlas backup:
- A file containing the checksums of the other files, using sha256
- Content of all databases, belonging to the running mysql instance
- Content of the passwords.yaml file in the /etc/puppet/hieradata/ directory
- Content of the root user directory
- Content of the atlasadm user directory
- Note:
- The Atlas backup does not store time zone and Atlas GUI settings information.
An example of a complete set of backup files is shown in Example 1.
Example 1 Files in Atlas Backup
atlas_backup.1465911268.sha256.enc atlas_backup.all-mysql-databases.1465911268.sql.bz2.enc atlas_backup.etc-puppet-hieradata-passwords.yaml.1465911268.master.tar.gz.enc atlas_backup.home-atlasadm.1465911268.master.tar.gz.enc atlas_backup.root.1465911268.master.tar.gz.enc
The filenames consist of the default or user given name, content indication, the date, and a file extension.
The date of the backup is in s format, where s is the number of seconds elapsed since 1970-01-01 00:00:00 UTC.
The user must ensure that the backup files are stored externally, in a persistent storage location, in case Atlas becomes inaccessible or corrupted.
3 Atlas Backup
The backup feature saves the configuration files and folders contained in the CEE Atlas image in a directory of encrypted tar files.
The command syntax is as follows:
atlas backup-create [--name <backup_name>] --p <backup_password>
The optional parameter --name can be used to name the backup. The default name is AtlasBackup. The backup name can only contain letters, numbers, and underscores. No special characters are allowed.
The positional parameter --p is used to encrypt the backup.
To back up the Atlas configuration, do the following:
- Log on to the Atlas VM.
- Start the backup procedure by issuing the below command:
atlasadm@atlas:~$ sudo atlas backup-create --name <backup_name> --p <backup_password>
A backup takes approximately 10 minutes to complete, depending on the amount of data to back up.
The following is displayed in the terminal window:
Running Atlas backup ... Done.
- By using the following command, verify that the backup
file has been created:
atlasadm@atlas:~$ sudo atlas backup-list
The command displays the following in the current terminal window:
ID Name Date 1465911268 atlas_backup Tue Jun 14 15:34:28 CEST 2016
- Save the ID and the password of the backup for future
use.
- Note:
- The ID is used in Section 4 for uploading the backup to Swift, and in Atlas Restore for downloading the backup files from Swift and for restoring Atlas from the backup. The password is used for restoring Atlas from backup.
- Copy the backup file to the predefined persistent storage
location.
For information on how to copy the backup using Swift, see Section 4.
4 Uploading Backup to Swift
This section describes how backups are uploaded, that is, copied to the AtlasBackups container in Swift.
To upload a backup to Swift, do the following:
- Switch user from atlasadm to root with the below command:
atlasadm@atlas:~$ sudo -i
- Ensure that the required backup directory and files are
present in /var/archives:
root@atlas:~# cd /var/archives root@atlas:/var/archives# ls <atlas_backup_directory>
An example of the command is the following:
root@atlas:/var/archives# ls atlas_backup1465911268
An example of the printout is:
atlas_backup.1465911268-all-mysql-databases.sql.bz2.enc atlas_backup.1465911268-root.master.tar.gz.enc atlas_backup.1465911268-etc-puppet-hieradata-passwords.yaml.master.tar.gz.enc atlas_backup.1465911268.sha256.enc atlas_backup.1465911268-home-atlasadm.master.tar.gz.enc
- Upload the backup for a specified ID:
root@atlas:/var/archives/# swift upload AtlasBackups *<backup_id>*
where <backup_id> is the ID of the backup.
An example of the command is:
root@atlas:/var/archives/# swift upload AtlasBackups *1465911268*
- Note:
- The backup files can be uploaded individually, by substituting the ID parameter with the name of the file.
- Verify that the backup files are uploaded:
root@atlas:/var/archives/# swift list AtlasBackups | grep <ID>
An example of the command is:
root@atlas:/var/archives/# swift list AtlasBackups | grep 1465911268
An example of the printout is:
atlas_backup1465911268/atlas_backup.1465911268-all-mysql-databases.sql.bz2.enc atlas_backup1465911268/atlas_backup.1465911268-etc-puppet-hieradata-passwords.yaml.master.tar.gz.enc atlas_backup1465911268/atlas_backup.1465911268-home-atlasadm.master.tar.gz.enc atlas_backup1465911268/atlas_backup.1465911268-root.master.tar.gz.enc atlas_backup1465911268/atlas_backup.1465911268.sha256.enc |

Contents