Backup

Prev Next

Available in VPC

In Backup, you can view the backup information configured for each DB cluster to safely store data for users using Cloud DB Serverless. Also, when the data is damaged due to a failure, you can perform restoration using the backup file that was in storage.

To use the backup and restoration, it is recommended to first understand the basic execution rules for the backup provided by Cloud DB Serverless. The basic backup execution rules are as follows:

  • Backup execution methods
    • Performed daily, once a day.
    • Select between automatic settings and user-defined settings.
      • Automatic settings: A random time will be specified when a Cluster is created and the backup will be performed at a time similar to the time of the first backup.
      • User-defined settings: Backup starts within 15 minutes after the user-selected time.
  • Backup file
    • Retention period: Can be retained for up to 30 days based on user settings.
    • Storage location: A separate data volume.

Backup interface

The basics of using the backup feature are as follows.

serverless_backup_01_ko

serverless_backup_02_ko

Component Description
① Menu name Current menu name.
② Basic features Check details for Cloud DB Serverless, refresh the Backup interface.
③ Backup tab Cluster Backup: View automatic backup list by DB cluster. / Imported Backup: View the list of backups retrieved from Object Storage.
④ Cluster Backup list Configured backup settings per DB cluster and settings information.
⑤ Details [Details]: Cluster Backup details and restoration, stored in Object Storage.
⑥ Import from Object Storage [Import from Object Storage]: Import backup files stored in Object Storage.
⑦ Imported Backup list List of imported backup files and status information.
⑧ Details [Details]: Imported Backup details and restoration.

Check backup settings list

You can check the backup settings list per DB server in operation. To view the backup settings list:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB Serverless.
  2. Click the Backup menu.
  3. When the backup settings list appears, check the required information.
    • DBMS: Created DB type.
    • DB Cluster name: DB Cluster name specified by user.
    • Backup retention date: Maximum number of days for the backup file to be stored in data storage.
    • Backup start time: Time at which the backup is performed once a day.
    • Backup data size: Size of the completed backup file.
    • Latest backup date: Date for the latest backup that was performed.
    • View details: Details and restoration of the backup file list created per DB cluster, saved to Object Storage.

Check backup file list per cluster

To view the list of backup files created for each Cluster after a backup has been completed:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB Serverless.
  2. Click the Backup menu.
  3. Click [Details] from View details of the backup settings row you want to check the details for.
  4. Check the details for the backup file.
    • Backup date: Date that the backup was performed
    • Backup time: Time on which the backup was performed
    • Backup Zone: Zone where the backup was performed
    • Backup data size: Size of the created backup file upon completion of backup (GB)
    • Status: Status of the backup operation

Restore data from console

Cloud DB Serverless provides a service that enables you to restore lost data using backup files and easily and quickly create a DB cluster.

Restore backup file

You can restore data using the backup file created through automatic backup.
To restore data using the created backup file:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB Serverless.
  2. Click the Backup menu.
  3. Click [Details] in the backup settings row you want to restore.
  4. Select the backup file and click [Restore backup file].
  5. When the Restore backup file popup appears, check or enter the required information for restoration.
    serverless_backup03_ko
    • Backup time: Restore to the time when the backup was completed.
    • VPC: VPC connection settings restored from the selected backup file and required for creating a new DB cluster.
    • Subnet: Subnet connection settings restored from the selected backup file and required for creating a new DB cluster.
    • Instance specification settings: You can enter the minimum and maximum units from 1 to 165, but the maximum value cannot be smaller than the minimum.
    • Auto Scaling policy settings: Select whether to use Auto Scaling policy settings.
      • Replica expansion criteria: Enter the threshold value for either average CPU usage or average number of Connections.
      • Enter the minimum Replica number and maximum Replica number of within the range of 1 to 15.
    • DB cluster name: Enter the name of the new DB cluster.
  6. Click [Restore].
  7. Click the DB Server menu.
  8. Check the status of the DB cluster restoration.
    • Starting: The status in which the DB cluster is being created (restored) with the information entered by the user
    • Configuring: The status in which the DB cluster is being created (restored) for configuration with the information entered by the user
    • Running: The status in which the creation (restoration) and configuration of the DB cluster have been completed based on user input data, and access is available
Caution

The completion of DB cluster restoration may take several minutes to dozens of minutes.

Store in Object Storage

You can store backup files created in Cloud DB Serverless in Object Storage and retain them elsewhere as needed. To save a stored backup file to Object Storage:

Note

Additional fees apply when you subscribe to Object Storage. For more information about Object Storage and pricing, see Services > Storage > Object Storage on the NAVER Cloud Platform portal.

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB Serverless.
  2. Click the Backup menu.
  3. Click [Details] of the backup settings row for the file you want to save to Object Storage.
  4. Select the backup file and click [Send to Object Storage].
  5. When the Send to Object Storage popup appears, click and select the bucket you want to save into.
    serverless_backup04_ko.png
  6. Click [Send to Object Storage].
  7. Click [OK].
Caution
  • When sending to Object Storage, bucket unlocking and access control settings must be disabled.
  • Exporting to Object Storage may take several minutes to several hours to be completed.

Imported Backup

In Cloud DB Serverless, you can create a new DB cluster by importing exported backup files stored in Object Storage. Imported Backup is priced at the same rate as Backup.

Caution
  • Successful recovery is guaranteed only for snapshot backup files generated by Cloud DB Serverless. Creating a new DB cluster using backup files from an unknown source is not supported.
  • All data except for storage engine tables allowed by Cloud DB Serverless is deleted (Plugin, DB ACL, etc.).
  • The DB version of the selected backup file and the DB cluster to be created must be the same. Data cannot be successfully imported if the DB versions are different or if the bucket has access control configured.
  • The backup file size must be less than 16 TiB.
  • Depending on the file size, it may take several minutes to several hours to complete the Backup Import.

Import backup from Object Storage

To import exported backup files stored in Object Storage:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB Serverless.
  2. Click the Backup menu.
  3. Click the Imported Backup tab.
  4. Click [Retrieve from Object Storage].
  5. When the Retrieve from Object Storage popup appears, enter the required information.
    • Bucket: Select the Object Storage bucket where the backup file is stored.
    • Restoration file: Select the backup file to import by clicking [Select restoration file].
    • DBMS type: Select the backup file's DBMS type.
    • DB engine version: Select the backup file's DB engine version.
    • Backup name: Enter the name of the backup to import (min. 3 char., max. 30 char.).
  6. Click [OK].

View Imported Backup list

To view the list of imported backup files:

  1. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Database > Cloud DB Serverless.
  2. Click the Backup menu.
  3. Click the Imported Backup tab.
  4. View the required information in the Imported Backup list.
    • Backup name: Backup name specified by the user during import.
    • Status: Current status of the Imported Backup.
    • DBMS: Backup file's DB type.
    • DBMS Version: Backup file's DB engine version.
    • Data size: Size of the imported backup file.
    • Import date: Date and time when import was completed.

View Imported Backup details

To view the details and progress status of an imported backup file:

  1. In the Imported Backup tab, click [Details] in the backup row you want to view.
  2. View the details.
    • Imported Backup information: Backup name, DBMS, DBMS version, data size, import date, and status
    • Import information: Start time, time elapsed
    • Import progress status: Backup download > Unzip > Validate > Create backup > Clean up temporary files > Complete
Note

If you attempt to import an invalid backup file, the process may fail. Check the [Details] of the relevant Imported Backup to view the failed step and cause of failure.

Imported Backup restoration

The following describes how to create a new DB cluster using an imported backup file. The DBMS type and DB engine version are applied based on the values ​​entered during the import step from Object Storage and cannot be changed.

  1. In the Imported Backup tab, click [Details] in the backup row you want to restore.

  2. Click [Restore backup file].

  3. When the Imported Backup restoration popup appears, enter the required information at each step.

    ① Cluster settings

    • Support high availability: If selected, two servers will be created and an additional fee will apply.
    • Instance specification settings: Input minimum and maximum units (1-15).
    • Auto Scaling policy settings: Select whether to automatically adjust the number of replicas through an Auto Scaling policy.
    • Data storage type: Select the data storage type to use. Currently, only CB2 is available.
    • DB Cluster name: Input the name of the new DB cluster (min. 3 char., max. 30 char.).

    ② DB settings

    • USER_ID: User ID to use for DB access.
    • USER password: User password to use for DB access.
    • DB access port: DB access port number (default value: 3306)
    • DB Config settings: View the optimized basic settings provided by NAVER.
    • Backup file retention period: Enter backup file retention period.
    • Backup time: Choose between automatic and user-defined.
    • Collect DB log: View the provision of log collection and viewer features for error logs and slow query logs.

    ③ Connection settings

    • VPC: Select the VPC to connect the DB cluster to.
    • Subnet: Select the subnet to connect the DB cluster to.
    • Set ACG: Automatically generate ACG for Cloud DB Serverless.

    ④ Final confirmation

    • Review the cluster information, DB information, and connection settings.
  4. After confirming the details, click [Create DB Cluster].

  5. Click the DB Server menu.

  6. Check the status of the DB cluster restoration.

    • Starting: The status in which the DB cluster is being created (restored) with the information entered by the user
    • Configuring: The status in which the DB cluster is being created (restored) for configuration with the information entered by the user
    • Running: The status in which the creation (restoration) and configuration of the DB cluster have been completed, and access is available
Caution

The completion of DB cluster restoration may take several minutes to dozens of minutes.

Restore backup file using Object Storage

After saving the backup file to NAVER Cloud Platform's Object Storage, you can restore data to an on-premises MySQL installation. To restore data using a backup file through Object Storage: The description is based on Rocky Linux 8.x–9.x application servers.

1. Prepare the backup file at the Object Storage

  1. Store the backup file to restore to the Object Storage, referring to save to Object Storage.
  2. In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Storage > Object Storage > Bucket Management and click on the bucket where the backup file is saved.
  3. Click the saved backup file, and then navigate to Edit > Permissions management.
  4. Set all sharing items to Public, and click [OK].
  5. From the details of the saved backup file, copy the link in the Link item.
Caution
  • If the backup file is made fully public, it can be downloaded from any location.
  • After downloading the backup file, you must properly set the access permissions.

2. Restore the data using the backup file

  1. Access the application server, referring to the Cloud DB Serverless quickstart.

  2. Paste the copied link in the following command, and then run it to download the backup file.

    • Once downloading the backup file is completed, change the Public settings to Private from Object Storage permissions management.
     # wget [Link]
    
     -- Example
     # wget https://kr.beta-object.ncloudstorage.com/test-bk-02/u-40001936-test-kr2-20251230084500.tar.gz
    
     # tar xzf [backup file name]
    
     -- Example
     # tar xzf u-40001936-test-kr2-20251230084500.tar.gz
    
  3. Run the following command to set the absolute path of the my.cnf file.

    # MYSQL_CONF=/etc/my.cnf
    
  4. Run the following commands, in order, to specify the path of BACKUP_DIR as the location of a temporary directory.

     # cd ~
     
     # mkdir backup
     
     # cd ./backup/
     
     # BACKUP_DIR=`pwd`
    
  5. Run the following commands, in order, to check if each path has been specified properly.

    # echo $MYSQL_CONF
    
    # echo $BACKUP_DIR
    
  6. Run the following commands to end MySQL in operation.

    # systemctl stop mysqld
    
  7. Run the following commands in order to check the datadir location in the my.cnf file, then move the directory specified by the datadir variable to the backup folder.

    # grep datadir ${MYSQL_CONF}
    
    # mv [data directory location] ${BACKUP_DIR}
    
    -- Example
    mv /var/lib/mysql ${BACKUP_DIR}
    
  8. Run the following commands in order to copy the backup files stored in Object Storage to the datadir location.

    # mkdir [data directory pathway]
    
    -- Example
    # mkdir /var/lib/mysql
    
    # cp -a [backup file pathway] [data directory pathway]
    
    -- Example
    # cp -a /root/data/* /var/lib/mysql/
    
  9. Enter the following commands, in order, to move to the location of datadir, and then change the datadir permission to mysql.

    # cd [data directory pathway]
    
    -- Example
    # cd /var/lib/mysql
    
    # chown -R mysql:mysql [data directory path]
    
    -- Example
    # chown -R mysql:mysql /var/lib/mysql
    
  10. Add the skip-grant-tables syntax under the [mysqld] syntax in the my.cnf file.

    # vi /etc/my.cnf
    
    [mysqld]
    skip-grant-tables
    
  11. Run the following commands, in order, to start MySQL and create a new root account.

    • When running create, the ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost' error may occur. In this case, run the drop user 'root'@'localhost'; command to delete the existing root account, and then run create again.
    # systemctl start mysqld
    
    mysql -u root -p
    
    mysql > flush privileges;
    mysql > create user root@localhost identified by 'password';
    mysql > grant all privileges on *.* to root@localhost with grant option;
    mysql > flush privileges;
    
  12. Delete the skip-grant-tables syntax added under the [mysqld] syntax in the my.cnf file, and then run the following command to restart MySQL.

    # systemctl restart mysqld
    
Note

Normal recovery is possible only when the version of MySQL used for the backup is identical to the version of MySQL you are restoring to.