• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. User Guide
  4. OBS Browser Operation Guide
  5. Typical Application
  6. Backing Up and Archiving Data

Backing Up and Archiving Data

Context

OBS charging is based on consumed storage capacity and service time. For example, a company has a large number of video or audio data to be backed up or archived in OBS. In the initial period of time, these files may be frequently accessed. However, these files may not be accessed any more, after a certain period of time. Therefore, the company can delete the files that are not to be accessed any more, to reduce cost and use OBS more efficiently.

You can use OBS Console and OBS Browser to store data. When using OBS for data backup or archive, you may need to store a large amount of data. In such cases, you can use OBS Browser to upload the data in batches. The batch upload function of OBS Browser greatly shortens the time for data upload.

Procedure

  1. Log in to OBS Console.
  2. Create the AK and SK that will be used to access OBS Browser.

    1. In the upper right corner of the OBS Console page, click the username and choose My Credential, as shown in Figure 1.
      Figure 1 Choosing My Credential
    2. My Credential page is displayed. Choose Access Keys > Add Access Key, as shown in Figure 2.

      Each user can create a maximum of two valid access keys.

      Figure 2 Adding access key
    3. In the Add Access Key dialog box that is displayed, enter the password and its verification code.
      NOTE:
      • If you have not bound an email address or mobile number, enter only the password.
      • If you have bound an email address and a mobile number, you can select the verification from either of these options.
    4. Click OK.
    5. Save the key as prompted. The key is directly saved to the default download folder of the browser.
      NOTE:

      To prevent the access keys from being leaked, keep it secure. If you click Cancel in the dialog box, the access keys will not be downloaded, and you cannot download them later. You can re-create an access key if you need to use it.

    6. Open the downloaded credentials.csv file to obtain the access keys (AK and SK).

  3. Use the access key created in 2 to log in to OBS Browser, as shown in Figure 3.

    Figure 3 OBS Browser account - OBS

  4. Create different storage types of buckets based on different application scenarios.

    • Backup scenario: Click Add Bucket. On the displayed dialog box, select Warm for Storage Class. Enter the bucket name and the selected region and click OK to create a bucket of the Warm storage class to store the backup data.
    • Archive scenario: Click Add Bucket. On the displayed dialog box, select Cold for Storage Class. Enter the bucket name and the selected region and click OK to create a bucket of the Cold storage class to store the archive data.

  5. Upload the data to be backed up or archived to the newly created bucket.
  6. Click the icon at the upper left corner of the displayed page to return to the bucket list.
  7. Right-click the bucket where the backup or archive data is stored, and select Configure Lifecycle Rule to go to the life cycle configuration page.
  8. In the Configure Lifecycle Rule dialog box, click Create. Figure 4 displays the Create Lifecycle Rule dialog box.

    Figure 4 Creating a lifecycle rule

  9. Select Enable and configure required parameters, and click Save.

    • Status

      Select Enable to enable the lifecycle rule.

    • Rule Name

      Identify lifecycle rules. The Rule Name contains a maximum of 255 characters.

    • Applies To: Can be set to Object name prefix or Bucket.
      • Object name prefix: Objects that have the specified prefix will be managed by the lifecycle rule.
      • Bucket: All objects in the bucket will be managed by the lifecycle rule.
    NOTE:
    • Object name prefix cannot start or end with a slash (/), have two consecutive slashes (/), or contain the following special characters: \:*?"<>|
    • When Object name prefix is selected and the specified prefix and the prefix of an existing lifecycle rule overlap, OBS regards the two rules as one and disables your rule. For example, if a rule with prefix abc exists in the system, another rule whose prefix starts with abc cannot be configured.
    • If a lifecycle rule whose Applies To is set to Object name prefix has been configured, you cannot configure a lifecycle rule whose Applies To is set to Bucket.
    • If a lifecycle rule whose Applies To is set to Bucket has been configured, you cannot configure a lifecycle rule whose Applies To is set to Object name prefix.

    Current Version or Historical Version:

    • Transition to Warm: You can specify the number of days after which objects that have been last updated and meet specified conditions are automatically transitioned to Warm. This number must be at least 30.
    • Transition to Cold: You can specify the number of days after which objects that have been last updated and meet specified conditions are automatically transitioned to Cold. If objects are configured to be transitioned to both Warm and Cold, the number of days for transition to Cold must be at least 30 days later than that for transition to Warm. If only transition to Cold is enabled and transition to Warm is disabled, there is no limit on the number of days for transition.
    • Expiration Time: You can specify the number of days after which objects that have been last updated and meet specified conditions are automatically deleted. The expiration time must be greater than the two transition times.
      NOTE:
      • Current Version and Historical Version are two concepts for Versioning. If Versioning is enabled, uploading objects with the same name to the same path generates different versions. The object uploaded later is called Current Version, and the object uploaded earlier is called Historical Version.
      • You can configure either, both, or neither of the versions.
    For example, the following files are stored on OBS on January 7, 2015:
    • log/test1.log
    • log/test2.log
    • doc/example.doc
    • doc/good.txt
    The following files are stored on OBS on January 10, 2015:
    • log/clientlog.log
    • log/serverlog.log
    • doc/work.doc
    • doc/travel.txt

      If objects prefixed with log is set to expire in 1 Day on January 10, 2015, OBS will delete objects log/test1.loglog/test2.loglog/clientlog.log, and log/serverlog.log on January 12, 2015.

      On the day of operation, you can set the objects with the name prefix log to be transitioned to Warm 30 days later, transitioned to Cold 60 days later, and deleted 100 days later. Then OBS will transition log/clientlog.loglog/serverlog.loglog/test1.log, and log/test2.log to Warm on the 31st day, transition them to Cold the 61st day, and delete them on the 101st day, respectively.

    NOTE:

    The storage class transition and deletion of an object may be delayed after the time condition is met. Generally, the delay does not exceed 48 hours.

  10. Click Save to save the lifecycle rule.