#!/usr/bin/tclsh
#
# This file is used to backup my homepage
#
set backupfile $env(HOME)
append backupfile "/Homepage-"
append backupfile [clock format [clock seconds] -format %Y%m%d]
append backupfile ".7z"
set backupdir $env(HOME)
append backupdir "/public_html"
set fileExist [file exists $backupfile]
if {$fileExist > 0} {
puts "Now try to remove old backup file."
file delete $backupfile
}
set var [list 7z a $backupfile $backupdir]
exec {*}$var
puts "Done."
使用 7-zip 建立網頁的備份檔案 (on Linux)。
沒有留言:
張貼留言