Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ServerBackup: Difference between revisions

From ZeroWiki
imported>neocoin
No edit summary
imported>neocoin
No edit summary
Line 38: Line 38:
  11 5 * * *  /root/backupToNeocoin.py >> /var/log/backupToNeocoin.log 2>&1
  11 5 * * *  /root/backupToNeocoin.py >> /var/log/backupToNeocoin.log 2>&1
# 적용
# 적용
=== Problem ===
* 문제 ~ DNS Server 가 죽었음 (or 잘못 설정되어 있음 165.194.35.222 서버 확인 필요) 그래서 주소 기반으로 외부로 ping을 날릴수 없다.
** 해결 ~
/etc/resolv.conf
에 무료 dns 서버 등록 http://theos.in/windows-xp/free-fast-public-dns-server-list/





Revision as of 07:11, 3 November 2008

Pre Process

사전 공부

Process

  1. screen 공유를 위한 서버 세팅
  1. 언어 선택
    • (./) Python
  1. 해당 언어로 ftp접속
#!/usr/bin/python


def uploadFile(filename):
    import ftplib
    s = ftplib.FTP('servername')
    s.login('server',password) # Connect
    f = open(filename,'rb')                # file to send
    s.storbinary('STOR %s'%filename, f)         # Send the file
    f.close()                                # Close file and FTP
    s.quit()

uploadFile('index.html')
  1. 백업 스크립트 작성
    • backup target 설정
    • mysql
/usr/bin/mysqldump -u <username> -p <password> <databasename> | gzip > /path/to/backup/db/zeropage_`date +%y_%m_%d`.gz
    • 복사
    • 압축
    • 암호화
  1. 전송 테스트
  2. 백업 정책 결정
    • 주기, 시각
  1. cron test
11 5 * * *   /root/backupToNeocoin.py >> /var/log/backupToNeocoin.log 2>&1
  1. 적용

Problem

  • 문제 ~ DNS Server 가 죽었음 (or 잘못 설정되어 있음 165.194.35.222 서버 확인 필요) 그래서 주소 기반으로 외부로 ping을 날릴수 없다.
    • 해결 ~
/etc/resolv.conf

에 무료 dns 서버 등록 http://theos.in/windows-xp/free-fast-public-dns-server-list/


Post Process

  1. 모니터링

앞으로 할일


분류