Backup cannot be restored due to non-UTF symbols

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:52:36 UTC

Modified:

2016-12-21 19:26:03 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Backup cannot be restored due to non-UTF symbols

Symptoms

  1. Backup restore from GUI stuck after IP mapping step;

  2. The following error is shown during backup restoration via cli:

    # /usr/local/psa/bin/pleskrestore --restore backup_info_*backup_number*.xml -level server
    Traceback (most recent call last):
    File "/opt/psa/admin/sbin/pmmcli", line 6, in <module>
    pmmcli.main()
    File "/opt/psa/admin/share/pmmcli/pmmcli.py", line 2283, in main
    _logger.critical("PMMUtility exception: \

    " + str(unicode(e)) + "\" + stacktrace.stacktrace()) UnicodeEncodeError: 'ascii' codec can't encode characters in position 1120-1124: ordinal not in range(128) Failed to parse response. Reason: Failed to read data from stream Process output:

  3. The following error can be found in pmmcli.log :

    PHP Warning: XMLReader::read(): /opt/psa/PMM/rsessions/*rsession_name*/dump.xml:2060: parser error : Input is not proper UTF-8, indicate encoding !
    Bytes: 0xE3 0x71 0x95 0xBC; File: /opt/psa/admin/plib/backup/Conflicts/Resolver/ConflictsResolver.php, Line: 2358

Cause

Data in /opt/psa/PMM/rsessions/*rsession_number*/dump.xml contains non-UTF8 symbols.

Resolution

  1. Check /var/lib/psa/dumps/domains/example.com/backup_info_*backup_number*.xml with xmllint utility:
    # cd /var/lib/psa/dumps/domains/example.com/
    # /usr/bin/xmllint --noout --schema /usr/local/psa/PMM/plesk.xsd backup_info_*backup_number*.xml

output will be like:

     /var/lib/psa/dumps/example.com/backup_info_*backup_number*.xml:851: parser error : PCDATA invalid Char value 11
a#dfJ1ZQ==^Ké
  1. Replace the non-UTF8 data with UTF8 symbols i.e.:

    # iconv -f "UTF-8" -t "UTF-8" backup_info_*backup_number*.xml -o backup_info_*backup_number*-edited.xml
    # diff backup_info_*backup_number*.xml backup_info_*backup_number*-edited.xml
  2. Delete the corresponding file ./.discovered/backup_info_ _ /status_WRONG-FORMAT

  3. Re-run backup restoration

Have more questions? Submit a request
Please sign in to leave a comment.