Skip to content

조회 수 8887 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

[MySQL] 특정 테이블만 백업하기

 

터미널이나 SSH를 이용해 접속하셨다면 리눅스 쉘상에서 다음과 같이 입력합니다.

[MySQL 테이블 백업]

형식) 내계정~]$mysqldump -u [사용자명] -p [데이타베이스명] [백업받을 테이블명] > [백업받을파일명]

localhost~]$ mysqldump -u testuser -p testDB testTable > test.sql
Enter password:

위에서는 testDB에 있는 testTable만 test.sql이란 파일로 백업받고 있습니다. Enter password: 란에 비밀번호만 제대로 입력하면 test.sql이란 파일에 testTable만 백업되어 있을것 입니다.
-p옵션뒤에 비밀번호를 바짝 붙여쓰면 비밀번호를 묻는 프롬프트를 생략할 수 있지만 보안상 저는 이방법이 더 낫다고
생각합니다.

[MySQL 백업된 테이블 복구]

형식) 내계정~]$mysq -u [사용자명] -p [데이타베이스명] < [백업받은 파일명]

localhost~]$ mysql -u testuser -p testDB < test.sql
Enter password:

테이블 복구는 테이블 한놈만 백업받든, 열놈을 백업받든 어차피 데이타베이스 내에 복구하는 것이므로 데이타베이스 복구와 명령어 차이가 없습니다.
역시 리눅스 쉘에서 명령어를 입력합니다.



  1. ../depcomp: line 571: exec: g++: not found

    Date2010.11.26 ByADMINPLAY Views19627
    Read More
  2. Another app is currently holding the yum lock; waiting for it to exit 해결법

    Date2010.03.08 Byl2zeo Views18392
    Read More
  3. FULLTEXT 인덱스와 서치

    Date2011.04.09 ByADMINPLAY Views17579
    Read More
  4. HeartBeat를 이용한 MySQL HA 구성

    Date2009.11.19 ByADMINPLAY Views10455
    Read More
  5. innodb recovery

    Date2013.01.21 Byl2zeo Views11271
    Read More
  6. InnoDB 에서 MyISAM 으로, 혹은 MyISAM 에서 InnoDB 로 DB 타입 변경 방법

    Date2013.11.08 ByADMINPLAY Views7970
    Read More
  7. InnoDB 와 MyISAM

    Date2008.12.14 ByADMINPLAY Views8714
    Read More
  8. latin1 로 저장된 db 를 euckr 또는 utf8로 변환하는 방법

    Date2010.05.28 ByADMINPLAY Views16681
    Read More
  9. libmysqlclient.so.15: cannot open shared object file: No such file or directory

    Date2010.07.07 ByADMINPLAY Views22975
    Read More
  10. lower_case_table_names=1

    Date2010.04.02 ByADMINPLAY Views18176
    Read More
  11. mysql - copying to tmp table

    Date2012.01.16 ByADMINPLAY Views18250
    Read More
  12. Mysql - Query Cache

    Date2011.04.09 ByADMINPLAY Views18523
    Read More
  13. MYSQL 4.0 --> 5.1 마이그레이션

    Date2012.01.16 ByADMINPLAY Views17290
    Read More
  14. MySQL 4.1 이상에서 한글 사용

    Date2009.09.28 ByADMINPLAY Views7424
    Read More
  15. Mysql 5.0.67 Cluster 소스설치 구성하기

    Date2009.11.19 ByADMINPLAY Views10008
    Read More
  16. mysql 5.5.x my.cnf 참고

    Date2013.09.24 ByADMINPLAY Views9462
    Read More
  17. Mysql bin log 로테이션 방법

    Date2009.11.26 ByADMINPLAY Views9682
    Read More
  18. MySQL Commercial License

    Date2009.09.28 ByADMINPLAY Views8134
    Read More
  19. mysql data디렉토리 변경

    Date2008.10.30 ByADMINPLAY Views9392
    Read More
  20. MySQL errno 의미 확인

    Date2010.05.29 Byl2zeo Views16723
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234