Article ID: 6256, created on Apr 16, 2009, last review on Jan 13, 2015

  • Applies to:
  • Virtuozzo containers for Linux 4.0

Symptoms

The error below is shown when try to restore data from Sitebuilder backup.
For example when try restoring user <USER NAME> from backup BACKUP.xml:

~# /usr/local/sitebuilder/utils/sbrestore user --name=<USER NAME> --recursive --with-sites --with-site-content --input=BACKUP.xml
Error: invalid input stream (PHP Warning : DOMDocument::loadXML(): internal errorExtra content at the end of the document in Entity, line: 159061)
Done
Please wait while the permissions are being set
Done
~#

How to resole the problem?

Cause

That means that backup file contains non-printable characters on this line 159061:

~# sed '159061 !d' BACKUP.xml
&lt;p align="left"&gt;&lt;em&gt;&lt;font size="1"&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&#13;
~#

Resolution

Using instructions below you may remove non-printable symbols on line 159061 that affect restoration of this particular user.

1. Create copy of the backup file just in case:

~# cp BACKUP.xml BACKUP.dump.xml

2. Open backup file BACKUP.xml, find line number 159061 and put it to a separate file test.txt.copy:

~# cat test.txt.copy
&lt;p align="left"&gt;&lt;em&gt;&lt;font size="1"&gt; &lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&#13;
~#

3. Find hex codes of all symbols in the file:

~# hexdump -C test.txt.copy
00000000  26 6c 74 3b 70 20 61 6c  69 67 6e 3d 22 6c 65 66  |&lt;p align="lef|
00000010  74 22 26 67 74 3b 26 6c  74 3b 65 6d 26 67 74 3b  |t"&gt;&lt;em&gt;|
00000020  26 6c 74 3b 66 6f 6e 74  20 73 69 7a 65 3d 22 31  |&lt;font size="1|
00000030  22 26 67 74 3b 01 20 26  6c 74 3b 2f 66 6f 6e 74  |"&gt;. &lt;/font|
00000040  26 67 74 3b 26 6c 74 3b  2f 65 6d 26 67 74 3b 26  |&gt;&lt;/em&gt;&|
00000050  6c 74 3b 2f 70 26 67 74  3b 26 23 31 33 3b 0a     |lt;/p&gt;&#13;.|
0000005e

The problem record is ".", this is symbol number 6. Hex code "01" corresponds to the symbol.

4. Replace the symbol with command tr:

~# tr -d '\001' < BACKUP.xml > BACKUP.corrected.xml

Backup file BACKUP.corrected.xml is free of the problem and good for destination.

NOTE: if there are several non-printable symbols in the backup file you need to remove them all in the same way.

The problem will be fixed in future update of Parallels Plesk Sitebuilder. During backup restoration non-printable symbols are skipped.

35c16f1fded8e42577cb3df16429c57a d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF