This tutorial is applicable for only Parallels Plesk Panel 10.x for Linux

If you need to quickly re-establish contents of /var/www/vhosts/ folder for all clients without restoring a full backup. Then you need to find the contents of the mentioned folders located in the dumps folder by using the following technique.

# grep DUMP_D /etc/psa/psa.conf
DUMP_D /var/lib/psa/dumps

Generally, it is located in /var/lib/psa/dumps/clients/<client_login>/domains/<domain_name>/ and has a name like testbackup_domain.com_vhost_1207281225.tgz

To restore vhost folder content for one domain, use the following command:

# tar zxvf /var/lib/psa/dumps/clients//domains//*vhost*.tgz -C /var/www/vhosts/

If you need to restore vhost directory content for all domains of all clients you can use below script:

#!/bin/bash
pass=`cat /etc/psa/.psa.shadow`
echo “select c.login,d.name from clients c join domains d on c.id = d.cl_id;” | mysql -uadmin -p$pass psa -Ns | grep -v admin | while read cl dom; do tar zxf /var/lib/psa/dumps/clients/$cl/domains/$dom/*vhost*.tgz -C /var/www/vhosts/$dom/ >& /dev/null; done

Put the above script into a file, for example to /root/vhost_restore.sh

Place the above script into a file, for example,/root/vhost_restore.sh

Make sure you assign the proper permissions:

# chmod 755 /root/vhost_restore.sh

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

How To Connect With WS_FTP?

FTP (File Transfer Protocol) programs allow you to upload, download, and manage files between your…

How Can You Customize a cPanel Server Using WHM Server Profile

In this article, we are going to explain to you how can you customize your…

How to Resolve Module Error in R1 Soft Backup?

When installing or updating the R1Soft/Idera CDP Agent, you may encounter module build failures due…