서버관리
2020.05.21 07:59

서버 이전

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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

서버이전순서

서버 이전은 아래와 같은 순서로 진행됩니다. (도메인 네임서버 설정이 끝난 경우)


1. DB 백업

2. 압축

3. 데이터 전송

4. 압축 해제

5. DB 복원

6. 도메인 설정 변경


1. DB 백업

$ mysqldump -u아이디 -p DB명 > 백업파일명.sql 

$ 데이터베이스비밀번호


2. 압축

$ tar cvzfp file1.tgz dir1 

> dir1 전체를 file1.tgz 파일로 퍼미션 보존 압축 


3. 데이터 전송


3.1. rsync를 사용하는 방법 (카페24에서는 rsync가 제공되지 않음.)

1) 원격 서버의 디렉토리를 로컬 서버로 복사하기

$ rsync -avzh root@175.123.253.69:/home/opeanut/opeanut20200503.tgz ./


2) 로컬 서버에서 원격 서버로 디렉토리 복사하기

$ rsync -avz public_html/ root@150.95.129.155:/home1/USERID/www/ 


3.2. Secure Copy를 사용하는 방법 (카페24 이용시 사용)

1) Remote 서버에서 파일 받기

$ scp -P 22 root@175.123.253.69:/home/opeanut/opeanut20200503.tgz ./

$ yes or no? (yes)

$ password? (패스워드 입력)

> remote 서버의 opeanut20200503.tgz 파일을 local의 ./ 로 다운로드 받는다.


2) Remote 서버에 파일 올리기

$ scp -P 22 /home/myhome/abc.tar oracle@123.456.78.9:/home/oracle/

> abc.tar 파일을 123.456.78.9 서버의 22번 포트로 SSH 접속하여 oracle 사용자로 로그인 한 후 /home/oracle/ 아래에 복사한다.


4. 압축 해제

$ tar xvfz 압축한파일명.tar.gz


5. DB 복원

$ mysql -u아이디 -p DB명 < 백업파일명 

$ 데이터베이스비밀번호


6. 도메인 설정 변경


#서버이전 #DB백업 #압축 #데이터전송 #압축해제 #DB복원 #도메인설정변경


참조글 

https://eond.com/tip/19250

https://eond.com/tip/19280

https://eond.com/tip/390500

https://eond.com/tip/380111

기존대댓글
추가시작 대댓글시작
대댓글끝 추가끝


  1. 서비스 상태 확인, 시작, 중지, 재시작 명령어이다. CentOS (서비스명: httpd)우분투 (서비스명: apache2)명령어 종류systemctl ★★service/etc/init.d/ ★apachectlhttpd[1]아파치 상태 확인systemctl status apache2service apache2 status/etc/init.d/apache2...

    서버관리 아파치 재실행

    Category서버관리 조회229 좋아요0
    서비스 상태 확인, 시작, 중지, 재시작 명령어이다. CentOS (서비스명: httpd)우분투 (서비스명: apache2)명령어 종류systemctl ★★service/etc/init.d/ ★apachectlhttpd[1]아파치 상태 확인systemctl status apache2service apache2 status/etc/init.d/apache2...
    Read More
  2. tar -zxvf [파일명.tar.gz]

    서버관리 압축해제

    Category서버관리 조회267 좋아요0
    tar -zxvf [파일명.tar.gz]
    Read More
  3. chown -R windbamin:windbamin /home/windbamin chmod +w /home/windbamin/ ls -all /home/

    서버관리 소유자 권한 설정

    Category서버관리 조회258 좋아요0
    chown -R windbamin:windbamin /home/windbamin chmod +w /home/windbamin/ ls -all /home/
    Read More
  4. ./add.sh windbamin windbamin.com www.windbamin.com

    서버관리 신규 유저 생성

    Category서버관리 조회270 좋아요0
    ./add.sh windbamin windbamin.com www.windbamin.com
    Read More
  5. https://to-dy.tistory.com/58 https://to-dy.tistory.com/58 http://blog.naver.com/PostView.nhn?blogId=tollu09&logNo=220845838393 http://blog.naver.com/PostView.nhn?blogId=tollu09&logNo=220845838393 https://inma.tistory.com/98 https://inma.tist...

    서버관리 Mysql 비밀번호 변경하는 방법

    Category서버관리 조회69 좋아요0
    https://to-dy.tistory.com/58 https://to-dy.tistory.com/58 http://blog.naver.com/PostView.nhn?blogId=tollu09&logNo=220845838393 http://blog.naver.com/PostView.nhn?blogId=tollu09&logNo=220845838393 https://inma.tistory.com/98 https://inma.tist...
    Read More
  6. root@q381-0663:/# mysqldump bash: mysqldump: command not found 오랜만에 백업해보려니 mysqldump 명령어가 실행되지 않더군요.. $ which mysqldump 위 명령어가 mysqldump를 찾는 명령어인데, 해보니 없는 거 같더군요. 아마 일전에 php7.4 업데이트할 때 ...

    서버관리 mysqldump not found

    Category서버관리 조회374 좋아요0
    root@q381-0663:/# mysqldump bash: mysqldump: command not found 오랜만에 백업해보려니 mysqldump 명령어가 실행되지 않더군요.. $ which mysqldump 위 명령어가 mysqldump를 찾는 명령어인데, 해보니 없는 거 같더군요. 아마 일전에 php7.4 업데이트할 때 ...
    Read More
  7. 비밀글입니다.

    서버관리 신규 사용자 생성

    Category서버관리 조회0 좋아요0
    비밀글입니다.
    Read More
  8. 서버이전순서 서버 이전은 아래와 같은 순서로 진행됩니다. (도메인 네임서버 설정이 끝난 경우) 1. DB 백업 2. 압축 3. 데이터 전송 4. 압축 해제 5. DB 복원 6. 도메인 설정 변경 1. DB 백업 $ mysqldump -u아이디 -p DB명 > 백업파일명.sql $ 데이터베이스...

    서버관리 서버 이전

    서버이전순서 서버 이전은 아래와 같은 순서로 진행됩니다. (도메인 네임서버 설정이 끝난 경우) 1. DB 백업 2. 압축 3. 데이터 전송 4. 압축 해제 5. DB 복원 6. 도메인 설정 변경 1. DB 백업 $ mysqldump -u아이디 -p DB명 > 백업파일명.sql $ 데이터베이스...
    Read More
Board Pagination Prev 1 Next
/ 1
닫기

마이페이지

로그인을 해주세요

네이버로 로그인