ntpdate time.stdtime.gov.tw
只要在每台下這個指令,
就會同步時間了.
#!/usr/bin/awk -f
BEGIN {
# Created by James Li
# 2011/10/21
# Backup all database.
tmp_country="ar:au:br:ca:carib:cn:cz:de:dk:es:eu:fr:hu:in:it:jp:kr:
latam:mea:mx:my:nl:pl:pt:rs:ru:th:tr:tw:ua:uk:us:vn:www"
db_dir = "/mysql/"
tar_dir = "/home/backup/mysql/"
split(tmp_country, country, ":")
for ( i in country ) {
tmp_db = db_dir country[i] "_db"
tmp_tar = tar_dir country[i] "_db.tar.gz"
cmd = "tar -zcvf " tmp_tar " " tmp_db
system(cmd)
}
}