2008-11-02 λΆν° μ§ννλ ZeroPage μλ² λ°μ΄ν° μκ²©μ§ λ°±μ
μ€ν¬λ¦½νΈ κ΄λ ¨ λ΄μ©.
Pre Process ¶
μ¬μ 곡λΆ
Process ¶
- screen 곡μ λ₯Ό μν μλ² μΈν
http://www.pixelbeat.org/docs/screen/
sudo κΆν μ€μ
/etc/group
μ admin κ·Έλ£Ήμ μνλ μ¬μ©μ μΆκ°,/etc/sudoers
μμ μ¬μ©μ μ κ±°
- μΈμ΄ μ ν
Python
- ν΄λΉ μΈμ΄λ‘ ftpμ μ
- http://docs.python.org/library/ftplib.html
μμ νμΌ νλλ₯Ό zeropage@neocoin.net μΌλ‘ μ¬λ¦°λ€.
#!/usr/bin/env 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')
- http://docs.python.org/library/ftplib.html
- λ°±μ
μ€ν¬λ¦½νΈ μμ±
- backup target μ€μ
- mysql
/usr/bin/mysqldump -u <username> -p <password> <databasename> | gzip > /path/to/backup/db/zeropage_`date +%y_%m_%d`.gz
- mysql
μμΆ ~ μ μ€ν¬λ¦½νΈμμ νκΊΌλ²μ μν
- μμ μ μ₯μμ λ³΅μ¬ ~
{{{/var/backup}} μ λ μμΉ * μλ² ν€λ₯Ό μ°μ§ μμ μ΅μμ μνΈν {{{ gpg --passphrase #{PASSWORD} --no-use-agent -c file }}} * 볡νΈν {{{ gpg file }}} 1. μ μ‘ ν μ€νΈ 1. λ°±μ μ μ± κ²°μ * μ£ΌκΈ°, μκ° 1. cron test * http://en.wikipedia.org/wiki/Cron μμ {{{ 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/ * λ¬Έμ ~ sudo κ° μλ¨ * ν΄κ²° ~ admin κ·Έλ£Ήμ μνλ μ¬μ©μ μΆκ° === Post Process === 1. λͺ¨λν°λ§ === μμΌλ‘ ν μΌ === 1. ---- [λΆλ₯]
- backup target μ€μ