# Creating a CSBS Backup

This section explains how to create CSBS backup jobs to protect ECS data.

#### Prerequisites

- If you want to use a backup to create an image, perform the following operations before creating a CSBS backup:
  - You have optimized the Linux ECS (referring to (Optional) Optimizing a Linux Private Image) and installed Cloud-Init (referring to Installing Cloud-Init).
  - You have optimized the Windows ECS (referring to (Optional) Optimizing a Windows Private Image) and installed Cloudbase-Init (referring to Installing Cloudbase-Init).

#### Procedure

1. Log in to the CSBS management console.

   1. Log in to the management console.
   2. Click in the upper left corner of the management console and select a region and a project.
   3. Under Storage > Cloud Server Backup Service.
2. In the upper right corner of the page, click Create CSBS Backup.
3. In the ECS list, select the ECSs you want to back up. After ECSs are selected, they are added to the list of selected ECSs. See Figure 1.

   Figure 1 Selecting servers
   - The selected ECSs must be in the Running or Stopped state.
   - ECSs with shared EVS disks can be backed up.
4. In the Configure Backup area, configure a backup scheme for the selected servers. See Figure 2.

   Figure 2 Configuring backup schemes
   - Auto Backup:

     In the Backup Policy drop-down list, select a backup policy. Alternatively, click Create Policy to create a backup policy. For details about the parameters of a backup policy, see Creating a Backup Policy.

     After a backup job is created, the selected ECSs are associated with the backup policy and will be periodically backed up according to the backup policy.

     If a selected ECS has been associated with another backup policy, it will be disassociated from the original backup policy automatically and then associated with the new backup policy.

   - Immediate Backup:

     After a backup job is created, all selected ECSs will be backed up immediately for once.

     Set the Name and Description of the backup, as described in Table 1.

     Table 1 Parameter description
     Parameter | Description | Remarks
     --- | --- | ---
     Name | Name of the backup you are creating. It is a string of 1 to 255 characters that can contain only digits, letters, underscores (_), and hyphens (-). NOTE: You can use the default name, which is in the format of manualbk_xxxx. If multiple ECSs are to be backed up, the system automatically adds suffixes to their names, for example, backup-0001 and backup-0002. | manualbk_cbf0
     Description | Supplementary information about the backup. It cannot exceed 255 characters. | --

   You can select both the backup methods at the same time.

5. Determine whether to select Enable next to Full Backup. If Full Backup is enabled, the generated full backup and later generated incremental backups will support Instant Restore. See Figure 3.

   Figure 3 Enabling Full Backup or not
6. Add tags to the backup. (This operation is optional if you select Immediate Backup.)

   A tag is represented in the form of a key-value pair. Tags are used to identify, classify, and search for cloud resources. These tags are used to filter and manage backup resources only. A backup can have a maximum of 10 tags.

   See Figure 4.

   Figure 4 Adding a tag
   Table 2 describes parameters of a tag.

   Table 2 Parameter description
   Parameter | Description | Example Value
   --- | --- | ---

   Key

   Tag key. Each tag of a backup has a unique key. The key of a tag is user-definable or is selected from those of existing tags in Tag Management Service (TMS).

   The naming rule of a tag key is as follows:
   - It ranges from 1 to 36 Unicode characters.
   - It can contain only letters, digits, hyphens (-), and underscores (_).

   Key_0001

   Value

   Tag value. Tag values can be repetitive or null.

   The naming rule of a tag value is as follows:
   - It ranges from 0 to 43 Unicode characters.
   - It can contain only letters, digits, hyphens (-), and underscores (_).

   Value_0001

7. Click Create Now.
8. On the Confirm page, confirm resource details and click Submit.
9. Return to the CSBS page as prompted.

   - Auto Backup

     On the Policies tab page, click on the left of the backup policy name. If all selected ECSs are displayed under Associated Servers, they are associated with the backup policy successfully, and automatic backup will be periodically performed as scheduled.

   - Immediate Backup

     On the Backups tab page, if the generated backups are in the Available state, the one-off backup job is successful.

Parent topic: Getting Started