Email to friend
* Your name:
* Your email:
* Friend's email:
Comment:


Restore defaced accounts or hacked account index pages cpanel

A normal cpanel restore takes too long to restore sites from the backup when all you need is the index pages (.html .php .htm)

1) Create a text file called userlist put each user account in the list that you would like to restore
2) go to the backup directory (we're using daily) located in /backup/cpbackup/daily/


----------

#!/bin/bash

#!/bin/bash

for i in `cat userlist`
do
tar xvzf $i.tar.gz *homedir.tar*
tar -C /home/$i/ -xvf /backup/cpbackup/daily/$i/homedir.tar *.php*
tar -C /home/$i/ -xvf /backup/cpbackup/daily/$i/homedir.tar *.html*
tar -C /home/$i/ -xvf /backup/cpbackup/daily/$i/homedir.tar *.htm*

# cleanup: remove tar folder and directory
rm -f /backup/cpbackup/daily/$i/homedir.tar
rmdir /backup/cpbackup/daily/$i/

  echo $i account restored  # Each planet on a separate line.
done

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



RSS

Del.icio.us Facebook Technorati Digg Furl
TEL : +27 (0) 21 3000 213

SHARED HOSTING

South African Hosting
Unlimited Web Hosting
Business Level Email
Email Only

RESELLER HOSTING

Unlimited - PHP MySQL
Overselling - PHP MySQL

DEDICATED HOSTING

VPS - Dedicated Root Servers

DOMAIN REGISTRATION

Register a Domain Name

 

 

ABOUT US

Contact Details
About Us
Terms and Conditions
Hosting Affiliate Program

 

Providing superior web hosting services. Tel: +27 (0)21 3000 213
Supported Web Technologies: Amplehosting.co.za a Greycell.co.za company. © 2004
Moving Hosts? Client Support