fix: 修改备份数据库时间戳格式为秒级时间戳

This commit is contained in:
xiao 2025-01-07 16:08:13 +08:00 committed by cnb
parent 6c6d998671
commit 9307506585

2
bt.sh
View File

@ -11,7 +11,7 @@ O_pl=$(cat /www/server/panel/data/o.pl)
backup_database() {
if [ -d "${Data_Path}" ] && [ ! -z "$(ls -A ${Data_Path})" ]; then
if [ ! -d "${Setup_Path}" ] || [ -z "$(ls -A ${Setup_Path})" ]; then
timestamp=$(date +"%Y%m%d%H%M%S")
timestamp=$(date +"%s")
tar czf /www/server/data_backup_$timestamp.tar.gz -C ${Data_Path} .
fi
fi