# !/bin/sh
# /root/stoplog.sh
f=stoplog$(date +%Y%m%d-%H%M%S).tar.gz
mount /dev/vda /mnt
tar czvf /mnt/archive/$f /var/log
umount /mnt
設定方式
編輯 /etc/default/local.stop
## Commands that will be executed at the beginning of shutdown
#
/root/archivelog.sh
/root/stoplog.sh
沒有留言:
張貼留言