-1

I used the Scheduled Backups feature in Virtualmin to back up my website. My hosting setup used the latest version of Virtualmin on a VPS running Ubuntu 22.04. Unfortunately, my VPS expired because I forgot to renew it, and the provider deleted the VPS along with all the data.

To recover, I created a new VPS, reinstalled Virtualmin, and restored the website using the backup I had saved previously. However, when I restored the database, all the website content failed to display correctly in Vietnamese. I made sure to select the utf8mb4_unicode_ci collation during the import process, but the issue persisted.

error

I also tried other collations like utf8mb4_general_ci, utf8mb4_vietnamese_ci, utf8_unicode_ci, etc., but none of them resolved the problem. This is concerning because the database contains a large amount of important data, and I’m unsure how to proceed.

DB SQL Backup

Please help me resolve this issue. Any advice would be greatly appreciated! Thanks!

2
  • 1
    Collation is irrelevant to the problem -- it just defines the sort order. What is important is the database and table character set, and the contents of the dump you are restoring, but you didn't specify either of these things or how you verified that the dump actually contains valid data.
    – mustaccio
    Commented Nov 26 at 16:07
  • Once we get past the CHARACTER SET being wrong somewhere, see can talk about the COLLATION utf8mb4_vietnamese_ci
    – Rick James
    Commented Nov 26 at 22:48

1 Answer 1

0

"restored the website using the backup" -- Could we see a little more of the backup -- namely where some Vietnamese text can be seen.

I worry that the backup may have been messed up.

Also, do this with one of the VN lines: SELECT col, HEX(col) ... to see whether the ? characters are already in the text, or whether they are caused by the display you provided. The SET NAMES utf8mb4 sounds correct, but may be too late in the dump-reload process.

More: https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.