Thursday, December 13, 2018

▷ MariaDB backup / restore

[ MariaDB Backup / Restore ]


1. Full backup / restore for databases
   전체 데이터베이스 백업 및 복원

(1) backup
    백업
    # mysqldump -uroot -p -A > backup_full.sql

(2) restore
    복구
    # mysql -uroot -p < backup_full.sql

2. Specific backup for databases
   특정 데이터베이스 백업

(1) Backup only the database named 'automateone'
'automateone' 데이터베이스만 백업
    # mysqldump -uroot -p automateone > backup_automateone.sql

(2) Backup only the table named 'tb_user' in the 'automateone' database
    'automateone' 데이터베이스의 'tb_user' 테이블만 백업
    # mysqldump -uroot -p automateone tb_user > backup_automateone_tb_user.sql

(3) Backup only data in the 'tb_user' table of the 'automateone' database where the 'emp_no' is greater than or equal to 10 and less than or equal to 50
    'automateone' 데이터베이스의 'tb_user' 테이블의 'emp_no' 열이 10이상 50이하인 데이터만 백업
    # mysqldump -uroot -p automateone tb_user -w’emp_no >= 10 and emp_no <= 50′ > backup_automateone_tb_user.sql

(4) Backup only table definitions in a specific database
    특정 데이터베이스의 테이블 definition 만 백업
    # mysqldump -uroot -p automateone --no-data > backup_automateone_def.sql

No comments:

Post a Comment

◈ Recent Post

▷ UITest demo with TestOne (Mobile, Keypad and Drag until found tip)

[ UITest Demo Environment ] 1. UITest Solution: TestOne 2. Description 데모 설명    How to use keypad, and to drag until found.     키패드를...

◈ Popular Posts