11/4/2023 0 Comments Mysql online backup![]() ![]() Step 1: Use mysqldump Command for Logical Backups In this guide, we will discuss how you can back up your MySQL database from an Alibaba Cloud Elastic Compute Service (ECS) instance running Ubuntu 16.04 either manually or by using automated scripts. ![]() When using MySQL server from Alibaba Cloud, you must consider data protection using backups and make it an essential part of your system or website even when the possibility of a database crash seems unlikely. Related Blog Posts How to Back Up MySQL Database on Alibaba Cloud ECS Ubuntu 16.04īackups are important for restoring data in case it is deleted or overwritten by mistake. For details, you can go to Restore MySQL databases or tables. Now in RDS for MySQL 5.6 High-Availability Edition, you can restore only certain databases or tables rather than the entire instance in the console. Then you can log in on the client as mysql to verify the success. Start mysqld process and verify the startup success mysqld_safe -defaults-file=/home/mysql/data/backup-my.cnf -user=mysql -datadir=/home/mysql/data & Step 5: Start mysqld process and log in for verification Run chown -R mysql:mysql /home/mysql/data and check whether the file owner is mysql user. If it displays “completed” or “OK”, it indicates execution success.ĭue to version issues, comment out the innodb_fast_checksum, innodb_page_size and innodb_log_block_size in backup-my.cnf in the extracted files. Then run the following command to restore the data: innobackupex -defaults-file=/home/mysql/data/backup-my.cnf -apply-log /home/mysql/data Install Percona-XtraBackup before extracting the backup file. Restore RDS for MySQL backup filesĭownload the extract tool first rds_backup_extract.sh and extract the backup files with the following commands: bash rds_backup_extract.sh -f /home/mysql/backup/hins575175_xtra_ -C /home/mysql/data For details, you can go to Back up RDS data - ApsaraDB for RDS. Now Alibaba Cloud ApsaraDB for RDS MySQL configure automatic backup or manual backup in the console. You can also check how to roll back MySQL databases from the files you backup here. Run the command to complete database backup: mysqldump -h -u xxx -P 3306 -p -opt -default-character-set=utf8 -triggers -hex-blob db_name > /tmp/db_name.sqlĪfter the password is entered, Mysqldump will carry out the backup and complete it automatically.Ĭheck the SQL file generated at the backup, and run ll xx.sql. Step 2: Back up the database of ApsaraDB for RDS instance Or you can use yum install mysql to install MySQL directly in the system. Step 1: Install MySQL Client on ECS (Linux)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |