fix: mv does not work cross devices

This commit is contained in:
tangfangzhi 2022-11-21 15:19:19 +08:00
parent 36a43fc016
commit f7f7b97279
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ function check_taosd_exit_type() {
if [ ! -z "$core_files" ]; then
# move core files to another folder
mkdir -p ${BACKUP_CORE_FOLDER}
mv ${core_folder}/${core_prefix}* ${BACKUP_CORE_FOLDER}/
cp ${core_folder}/${core_prefix}* ${BACKUP_CORE_FOLDER}/
rm -f ${core_folder}/${core_prefix}*
set_service_state "error" "taosd exit with core file"
else
set_service_state "error" "taosd exit without core file"