Updated on 2023-09-19 GMT+08:00

Creating a Backup

OBS and CBR store BCS backups. Backups of management data are stored in OBS and backups of ledger data are stored in CBR.

You can enable automatic backup when creating an enhanced Hyperledger Fabric instance, or you can enable it by creating a manual backup.

The following introduces two ways of creating backups:

Creating a Backup Manually

  1. Log in to the BCS console.
  2. On the Instance Management page, click the Enhanced Hyperledger Fabric tab.
  3. Click an instance to go to the details page.
  4. On the Backups tab page, click Manual Backup.
  5. Click OK. A backup task is generated. If the task is in the Finished state, the data stored on the blockchain is backed up.

    • A maximum of 10 manual backups can be created. If there are too many backups, delete unnecessary ones.
    • Instances with backups can be billed in the yearly/monthly or pay-per-use mode.
      • If yearly/monthly billing is used, backups will not be deleted immediately but 7 days later after you unsubscribe from the instance. They can also be manually deleted on the OBS and CBR consoles. On the OBS console, go to the Buckets page, click an instance (bcs-backup-nodelete-project ID/BCS instance ID), and delete the backups. On the CBR console, go to the SFS Turbo Backups page, click an instance (bcs-backup-BCS instance ID), and delete the backups.
      • If pay-per-use billing is used, you can choose to delete instance backups when deleting an instance. Note that this operation deletes only the ledger data backed up in CBR. You will have to delete backups in OBS manually. You can either delete the CCE cluster or the SFS file system when deleting an instance, that is, select the second or the third checkbox. In this way, you can still restore your instance. But if you select to delete instance backups, the first checkbox, your instance will not be able to be restored.

Enabling Automatic Backup

You can enable automatic backup when creating an enhanced Hyperledger Fabric instance, or you can enable it by creating a manual backup.

Automatic backup applies to the following operations:

  • Creating an instance
  • Adding a peer to an organization
  • Deleting a peer from an organization
  • Adding a peer to a channel
  • Adding an organization
  • Upgrading a BCS instance
  • Joining a consortium
  • Creating a channel
  • Deleting a channel
  • Removing an instance from a consortium
  • Removing a peer from a channel
  • Removing an organization from a channel
  • Multiple backups will be generated for multiple operations. You will have to wait for the backup process to complete.
  • A maximum of 10 automatic backups can be created. The system will delete certain backups to keep only 10 backups.

    The backup task will be deleted in the order of priority listed below:

    1. A failed task of backing up management plane data or data plane data
    2. A backup that contains no management plane data or data plane data
    3. A backup whose instance status is abnormal when the backup is complete
    4. The earliest backup

Viewing Backup Logs

  1. Log in to the BCS console.
  2. On the Instance Management page, click the Enhanced Hyperledger Fabric tab.
  3. Click an instance to go to the details page.
  4. On the Backups tab page, click Backup Logs in the Operation column of a backup.

  5. View the backup logs.

    create efs snapshots succeeded: Ledger data has been backed up. create manage backup file success: Management data has been backed up. when the backup is complete, the instance status is Normal: The enhanced Hyperledger Fabric instance is normal when backing up. If all these messages are displayed, the backup is successful.

Deleting a Backup

You can delete excess and unnecessary backups as required.

  1. Log in to the BCS console.
  2. On the Instance Management page, click the Enhanced Hyperledger Fabric tab.
  3. Click an instance to go to the details page.
  4. On the Backups tab page, click Delete in the Operation column of a backup.

  5. Click OK.