• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

pleskrestore fails

Mshaker

Basic Pleskian
I'm just wondering if this is a plesk error or if I'm missing something. I did a full server backup using pleskbackup and when I did the full restore on the new machine none of the databases or mail accounts could not restore.

The restore server was running CentOS release 6.3 (Final) 32bit on Plesk 11.0.9 Update #37. The backup server was CentOS release 6.3 (Final) 64bit on Plesk 11.0.9 Update #37.

Here are the content of the error logs (names were changed):

Code:
<object type="domain" name="yourdomain.com">
            <message code="FailedMailuserDeployment" severity="error" id="4aedda90-de97-4f4e-8f39-a492154eb4fd">
                <description>Failed deployment of mail user [email protected]</description>
                <message code="ExecCmd::ExFailed" severity="error" id="7b93cb33-5991-4b70-8ebb-1f7cc2d60023">
                    <description>Execution of /usr/local/psa/admin/plib/api-cli/mail.php --create [email protected] -passwd '' -passwd_type sym -mailbox true -ignore-nonexistent-options failed with return code 1.
Stderr is
An error occured during mailname creation: Can't create mailname:
Wrong syntax for command's '-passwd' parameter. 

</description>
                </message>
            </message>
	</object>		
			
			
			
			 <object type="database" name="yourdatabase">
                <message code="FailedDatabaseUserDeployment" severity="error" id="a9fd0f77-712e-4fd7-83d2-239fd7aec749">
                    <description>Failed deployment of database user yourdatabase of database yourdatabase</description>
                    <message code="ExecCmd::ExFailed" severity="error" id="ca370977-ab7e-4a94-80ae-67daeb14d5d5">
                        <description>Execution of /usr/local/psa/admin/plib/api-cli/database.php --update yourdatabase -add_user yourdatabase -type mysql -print-id -default -passwd '' -passwd_type sym -ignore-nonexistent-options failed with return code 1.
Stderr is
Wrong syntax for command's '-passwd' parameter. 

</description>
                    </message>
                </message>
            </object>

All the errors reference "Stderr is Wrong syntax for command's '-passwd' parameter." ? They all seem to be empty. Is this related to Plesk's new Security Enhanced Mode (Which was on for both servers) ? Any thoughts ?
 
thanks for the link

Thanks for the troubleshooting.plesk.parallels.com link! I looked at the KB article and still don't quite understand how to fix things.

Plesk enhanced security is enabled by default for all new plesk server installs. Does this mean that the full server pleskbackup and pleskrestore aren't valid any more as they can't decrypt the passwords ?

From the KB article:
1) If possible, export the backup -- save it from the PP interface or upload it to an FTP repository. In this case, PP server will decrypt passwords in order to make the backup portable.

Why doesn't the plesk CLI backup just do this by default ? What is the CLI command to do a full server backup on one server and restore on another server with all the passwords working ?
 
bump this thread

Sorry to bump this thread. Could someone from Parallels please tell me the commands to do a full plesk backup and restore using the CLI commands that will restore everything like in previous versions of plesk (with enhanced security mode on).
 
May I know what are you trying to do exactly? Are you trying to automate something process or just restore existing server backup at once? It is better to hear more about your specific reasons.
 
Full server backup and restore

In the past I was able to do a full server backup using the pleskbackup tools. This was great for when you are switching servers or upgrading a distro to major new release:

Command
/usr/local/psa/bin/pleskbackup server -s -v

I could run a plesk backup to a new drive or USB drive. Then put the new drive onto a new fresh server and run the command:

/usr/local/psa/bin/pleskrestore --restore <backup repository root>/<server>.xml -level server -license -verbose

This would restore the backup onto the new server. But now with plesk 11 this is impossible. When you try and do the restore all the passwords from the backup (database, FTP, mail account etc) are empty so nothing will restore (the plesk restore utilities just result in errors). I'm thinking that this is because of the new security enhanced mode (which is now enabled by default).

This is scary to think that we no longer have a portable full backup solution anymore.
 
Yes, you are right.
Plesk stores passwords for some type of users symmetric hashes. It encrypt and decrypt it with server-specific key.
So when you move existing backup to other Plesk server - server key is differendt and passwords could not be decrypted.

There is two ways to solve a problem:
1. Use GUI to download backup or export backup with pleskbackup utility
http://download1.parallels.com/Ples...linux-advanced-administration-guide/68841.htm
2. Change type='sym' to type='plain' in xml backup file.

Actually, all steps was already described in http://kb.parallels.com/en/115421
 
already looked at that KB article

Yes I've already looked at that article. Many times exporting a 500GB+ backup from the plesk interface isn't a really viable option and generating all new passwords using fix_sym_passwd.pl isn't a good option either.

Plesk should allow you to migrate the server-specific key (You could easily check to see if you are running the CLI tools with root access anyway) so that you can restore it on a different server with the passwords intact.
 
Many times exporting a 500GB+ backup from the plesk interface isn't a really viable option
I do not understand why do you restore Plesk backup so often to other server with using USB drive?
 
distro upgrades

I do not understand why do you restore Plesk backup so often to other server with using USB drive?

We don't do it that often but when we do its invaluable. Any time a servers distro is end of life (Eg. Upgrading from Centos 5 to Centos 6). The pleskbackup and restore tools are the only "clean" way to do this. You upgrade each server to identical Plesk versions running different OS releases then pleskbackup from one and pleskrestore to another. The bottom line is that any backup system should be portable from one server to the next. With the new pleskbackup and pleskrestore this is no longer the case.
 
Last edited:
So in this case we are talking about planned data transferring that means that source server is running. And you have already know the solution: download backup in GUI or use Migration manager.
 
Back
Top