0

Linux plesk: Unable to restore plesk domain dump using pleskrestore

Saturday, May 10, 2008

You need to extract the contents of domain dump first. The dump location can be found from psa.conf file (ex. DUMP_D /var/lib/psa/dumps).

cd /var/lib/psa/dumps/1/12 (here psa domain dump directory is /var/lib/psa/dumps/1/12)
mkdir recover
cd recover
zcat DOMAINNAME_2008.03.25_07-11-10 > DOMAINNAME_DUMP_FILE

The domain contents will be extracted here. You can move the contents to respective directories and give proper permission. If the content size greater than 2GB it will produce errors.

In that case we need to do the following steps:

Create a map file of the domain:

/usr/local/psa/bin/pleskrestore --create-map DOMAINNAME_DUMP_FILE -map map_DOMAINUSER

Find the client name of domain from PSA database.

mysql -uadmin -p`cat /etc/psa/.psa.shadow`
use psa
SELECT clients.login, clients.cname, clients.email, accounts.password FROM domains LEFT JOIN clients ON domains.cl_id = clients.id LEFT JOIN accounts ON clients.account_id = accounts.id WHERE domains.name ='DOMAINNAME';
+-----------+-------------------------+--------------------+----------+
| login | cname | email | password |
+-----------+-------------------------+--------------------+----------+
| mydomains | COMPANY_NAME | EMAIL_ID | jkhasdi |
+-----------+-------------------------+--------------------+----------+

Check the map_DOMAINUSER file. If the client name is empty in map file the domain dump restore will not happen.

Modify the map file map_DOMAINUSER:
Replace [] with client name. Here it is [mydomains]
Make sure that syntax of the mapfile is correct and IP properly mentioned in it.

Now you can restore the domain dump using "pleskrestore".

/usr/local/psa/bin/pleskrestore --restore DOMAINNAME_DUMP_FILE -level domains -filter list:DOMAINNAME -map map_DOMAINUSER

0 Responses to "Linux plesk: Unable to restore plesk domain dump using pleskrestore"