[shell][파일] ftp 를 이용한 자동 백업
원격 컴퓨터 data backup script
#!/usr/bin/expect
cd /root/mdbbackup/30
set timeout -1
spawn ftp 211.47.64.141
expect “Name (211.47.64.141:root):”
send “kobis\\r”
expect “Password:”
send “koba007\\r”
expect “Using binary mode to transfer files.”
send “get kobis.mdb\\r”
set timeout -1
expect “Transfer complete.”
send “quit\\r”
interact
이후 crontab에서
10 * * * * /root/mdbbackup/10/mdbbackupexe
30 * * * * /root/mdbbackup/30/mdbbackupexe
50 * * * * /root/mdbbackup/50/mdbbackupexe
이러면 원격으로 접속해서 받아와 저장하겠죠?
(내가 생각 아님)
harp instrument
calm music