Update timestamp format in backup_database function for bt.sh scripts

This commit is contained in:
xiao 2025-01-07 16:07:52 +08:00
parent 14fe50fa2d
commit b92545114d
2 changed files with 2 additions and 2 deletions

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

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