Unable to restore backup PHP Warning: fread(): 268 is not a valid stream resource

Created:

2016-11-16 12:42:34 UTC

Modified:

2017-08-08 13:29:56 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to restore backup PHP Warning: fread(): 268 is not a valid stream resource

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to restore a backup with a predefined IP mapping using the command like:

# /usr/local/psa/bin/pleskrestore --restore /var/lib/psa/dumps/<backup.xml> -map /var/lib/psa/dumps/<mapfile> -level domains

The following error appears:

ERR [1] PHP Warning: fread(): 268 is not a valid stream resource; File: /usr/local/psa/admin/plib/StreamXMLReader.php, Line: 110

ERR [panel] Failed to read data from stream:
0: /usr/local/psa/admin/plib/StreamXMLReader.php:112
StreamXMLReader->parse()
1: /usr/local/psa/admin/plib/StreamXMLReader.php:179
StreamXMLReader->read(string 'conflicts-description', integer '2', integer '1', integer '0')
2: /usr/local/psa/admin/plib/StreamXMLReader.php:248
StreamXMLReader->sub(string 'conflicts-description', integer '2')
3: /usr/local/psa/admin/plib/backup/protocol/PMMResponseRestoreTaskResult.php:27
PMMResponseRestoreTaskResult->getConflictsDescription()
4: /usr/local/psa/admin/plib/backup/cuPleskRestore.php:945
cuPleskRestore->_doRestore(array, string '/var/lib/psa/dumps/BACKUP_OF_MY_SERVER.xml', object of type RestoreMapping, NULL null, string '/var/lib/psa/dumps/mapfile.txt')
5: /usr/local/psa/admin/plib/backup/cuPleskRestore.php:1156
cuPleskRestore->cmdRestore(string '/var/lib/psa/dumps/BACKUP_OF_MY_SERVER.xml')
6: /usr/local/psa/admin/plib/backup/cuPleskRestore.php:304
cuPleskRestore->__construct()
7: /usr/local/psa/admin/plib/backup/pleskrestore.php:9

Map file has the following content:

# less /var/lib/psa/dumps/<mapfile>

[ip-map]
# Unchanged IP addresses:
# Please review default IP addresses mapping below:
# ip type has improper value. Current ip type value is exclusive
10.10.10.10 shared -> 10.10.10.10 shared

10.10.10.10 IP Address is dedicated in Tools and Settings > IP Addresses

Cause

IP type in the mapping file has improper value, e.g it is set to be shared in the map file but it is reported by Plesk to be exclusive , meaning dedicated .

Resolution

Correct IP types in the mapping file according to server settings in Home > Tools & Settings > IP Addresses and restart restoration procedure.

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