Thank you for clarifying that my situation can be considered as “dangerous”. That’s why I am trying to get help here.
This is from the documentation:
"When this finishes, you should see an InnoDB shutdown
with a message such as the following, where again the value of LSN will depend on your system:
InnoDB: Shutdown completed; log sequence number 137345046 160906 11:21:01 completed OK!
All following prepares will not change the already prepared data files, you’ll see that output says:
xtrabackup: This target seems to be already prepared. xtrabackup: notice: xtrabackup_logfile was already used to ‘–prepare’."
In my case I never see the message “xtrabackup: This target seems to be already prepared…”
Here is what I see:
Tue Jan 12 03:34:46 PST 2021
# xtrabackup --prepare --target-dir=/var/lib/backup/DB-name-backup
...
FTS optimize thread exiting.
Trying to access missing tablespace 4294967294
Starting shutdown...
Log background threads are being closed...
Shutdown completed; log sequence number 62760568332
210112 03:35:30 completed OK!
#echo $#
0
Tue Jan 12 03:36:12 PST 2021
# xtrabackup --prepare --target-dir=/var/lib/backup/DB-name-backup
...
FTS optimize thread exiting.
Trying to access missing tablespace 4294967294
Starting shutdown...
Log background threads are being closed...
Shutdown completed; log sequence number 62760568332
210112 03:36:41 completed OK!
#echo $#
0
It is like the “xtrabackup” cannot understand that data is already prepared and runs preparation again. Which as you said “is dangerous”