• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

New Plesk server is not restoring from previous server backup

sgweb

New Pleskian
Hello, I have a pretty unique situation. Let me break it down for you.

Background
I have been running Plesk 12 on a CentOS server for the past year or so. Last Friday this server died. I have since started a new Ubuntu server, have installed Plesk 12, and am attempting to restore my plesk server from a backup.

My backup has 44 websites on it and is nearly 3GB in size. This proves to be an issue as the maximum file size for uploading a backup is 2GB. Because of this, I am attempting to restore from CLI.

---------------------------------------------

I have taken my backup and have unzipped (un-tarred?) my backup.

Currently this is the command I am using.

Code:
sudo /usr/local/psa/bin/pleskrestore --restore  /var/lib/psa/dumps/plesk_webserver/plesk_webserver.sg_info_1509010300.xml -ignore-sign -level server

This greets me with an error.

Code:
<?xml version="1.0"?>
<conflicts-description>
<conflict id="1" guid="e6522fc3e3cd32f78972ff37a6965375">
  <type>
   <configuration>
    <reason-description>
     <required-resource-description>
      <ip type="shared" value="172.27.0.221"/>
     </required-resource-description>
    </reason-description>
    <resolve-options>
     <option name="rename"/>
     <option name="do-not-restore"/>
    </resolve-options>
   </configuration>
  </type>
  <conflicting-objects/>
</conflict>
</conflicts-description>
Unable to resolve all conflicts

I have made a conflict resolution xml.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<resolve-conflicts-task-description>
<conflict-resolution-rules>
<policy />
<rule conflict-id="0">
<resolution>
<rename new-name="ip-type:shared:ip-address:172.27.1.20"/>
</resolution>
</rule>
</conflict-resolution-rules>
</resolve-conflicts-task-description>

However upon using this command

Code:
sudo /usr/local/psa/bin/pleskrestore --restore  /var/lib/psa/dumps/plesk_webserver/plesk_webserver.stonegate_info_1509010300.xml -ignore-sign -level server -conflicts-resolution /home/webmaster/Downloads/conflict.xml

I am getting this string of errors.

Code:
ERR [panel] Failed to read data from stream:
0: StreamXMLReader.php:109
    StreamXMLReader->parse()
1: StreamXMLReader.php:176
    StreamXMLReader->read(string 'conflicts-description', integer '2', integer '1', integer '0')
2: StreamXMLReader.php:245
    StreamXMLReader->sub(string 'conflicts-description', integer '2')
3: PMMResponseRestoreTaskResult.php:27
    PMMResponseRestoreTaskResult->getConflictsDescription()
4: cuPleskRestore.php:954
    cuPleskRestore->_doRestore(array, string '/var/lib/psa/dumps/plesk_webserver/plesk_webserver.sg_info_1509010300.xml', object of type RestoreMapping, string '/home/webmaster/Downloads/conflict2.xml', NULL null)
5: cuPleskRestore.php:1163
    cuPleskRestore->cmdRestore(string '/var/lib/psa/dumps/plesk_webserver/plesk_webserver.sg_info_1509010300.xml')
6: cuPleskRestore.php:307
    cuPleskRestore->__construct()
7: pleskrestore.php:9

I am unsure of where to go from here. Any help?
 
The easiest way is to import your dump first and then restore from UI
To import the dump call:
Code:
/usr/local/psa/admin/bin/pmm-ras --import-file-as-dump --dump-file-specification=/root/plesk_webserver.sg_info_1509010300.xml --dump-storage=/var/lib/psa/dumps/ --type=server --session-path=/var/log/plesk/PMM --check-sign --force
Then go to the Panel. Menu Tools & Settings > Backup Manager
You should see your backup there and should be able to restore from it, as the same steps performed on dump upload over UI or direct restore from FTP
 
The easiest way is to import your dump first and then restore from UI
To import the dump call:
Code:
/usr/local/psa/admin/bin/pmm-ras --import-file-as-dump --dump-file-specification=/root/plesk_webserver.sg_info_1509010300.xml --dump-storage=/var/lib/psa/dumps/ --type=server --session-path=/var/log/plesk/PMM --check-sign --force
Then go to the Panel. Menu Tools & Settings > Backup Manager
You should see your backup there and should be able to restore from it, as the same steps performed on dump upload over UI or direct restore from FTP

Code:
Repository error: Unknown archive type. Could not get converter for specified dump file 'plesk_webserver.sg_info_1509010300.xml'

I've tried using the .tar version as well. Is there something I'm missing?

This type of conflict is described in Advanced Guide here - http://download1.parallels.com/Ples...linux-advanced-administration-guide/68860.htm
In short - you haven't required shared IP address on destination server.

I used this example as a basis for writing my conflict resolution xml. I'm failing to see what I did wrong or what I am missing though.
I attempted to use your command. I get this error when I do so though.
 
Sorry, I supposed you have a backup exported with Plesk tools and "plesk_webserver.sg_info_1509010300.xml" actually is a tar. Now I see it is not.
So you have a copy of your /var/lib/psa/dumps from the source server and "plesk_webserver.sg_info_1509010300.xml" is a root XML file from this dump.
In such a case you need to deploy whole dump to /var/lib/psa/dumps. Then you should reset passwords in the dump by using Perl script from this KB http://kb.odin.com/en/116138
And run restore from UI

Your first attempt to restore backup with pleskrestore utility displayed error, which looks like you have dedicated IP on target server with Plesk. Check it in Tools & Settings > IP Addresses and if so, change it to shared. It may be enough and you will able to restore by calling:
Code:
/usr/local/psa/bin/pleskrestore --restore  /var/lib/psa/dumps/plesk_webserver/plesk_webserver.sg_info_1509010300.xml -ignore-sign -level server
and IPs will be mapped automatically
If not you can try the following KB for pleskrestore http://kb.odin.com/en/6164
 
Sorry, I supposed you have a backup exported with Plesk tools and "plesk_webserver.sg_info_1509010300.xml" actually is a tar. Now I see it is not.
So you have a copy of your /var/lib/psa/dumps from the source server and "plesk_webserver.sg_info_1509010300.xml" is a root XML file from this dump.
In such a case you need to deploy whole dump to /var/lib/psa/dumps. Then you should reset passwords in the dump by using Perl script from this KB http://kb.odin.com/en/116138
And run restore from UI

Your first attempt to restore backup with pleskrestore utility displayed error, which looks like you have dedicated IP on target server with Plesk. Check it in Tools & Settings > IP Addresses and if so, change it to shared. It may be enough and you will able to restore by calling:
Code:
/usr/local/psa/bin/pleskrestore --restore  /var/lib/psa/dumps/plesk_webserver/plesk_webserver.sg_info_1509010300.xml -ignore-sign -level server
and IPs will be mapped automatically
If not you can try the following KB for pleskrestore http://kb.odin.com/en/6164

Thank you for your help Dmitry!

I am looking through the password reset KB article and I notice that the command listed is for Windows only, is this correct? This is the command given.

Code:
for /r %x in (*.xml) do "%plesk_dir%\Additional\perl\bin\perl.exe" -p -i~ fix_sym_passwd.pl "%x"

My server is running Ubuntu. I attempted to run this command but it gives me syntax errors.

"bash: syntax error near unexpected token `%x' "
 
Back
Top