Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Close 2 U

    A Shell Script to fix index injuction - restore from Cpanel backups

    Hi guys ...
    I want to share with you this nice script that I did with my best friend and I need a small help ...

    PHP Code:

    if [ $# -ne 1 ]
    echo "Error in $0 - Invalid Argument Count"
    echo "Syntax: $0 username"

    sudo rm 
    sudo rm -/home2/$1/public_html/index.*

    #as much homes you have

    cd /backup/cpbackup/weekly/
    sudo tar -zxvf /backup/cpbackup/weekly//$1.tar.gz

    cd /backup/cpbackup/weekly/$1/
    sudo tar -xvvf /backup/cpbackup/weekly/$1/homedir.tar

    sudo cp 
    /backup/cpbackup/weekly/$1/public_html/index.* /home/$1/public_html/
    sudo cp /backup/cpbackup/weekly/$1/public_html/index.* /home2/$1/public_html/
    sudo chown $1.$/home/$1/public_html/index.*

    sudo chown $1.$/home2/$1/public_html/index.*

    sudo rm -rf /backup/cpbackup/weekly/$1
    echo Done 
    if I have a list of users that I want to restore their index pages ? how my I integrate them ..

    Note: the users " user names" I have can be pasted in the code or called from another file ..

    i have this in a file like:

    etc ..

    advise ...

    Not as that Much Expert
    I'm just a "LostEagle"

  2. #2
    Join Date
    Nov 2004
    You may want to download the script from called "revert". You cd to the appropriate directory and run the "revert filename" command and it extracts the unique versions from your local cpanel backups.

Similar Threads

  1. Script to copy all index.htm index.html index.php from all users
    By WhiteBear in forum Hosting Security and Technology
    Replies: 2
    Last Post: 06-29-2010, 12:41 PM
  2. Urgently - Mass restore index from backups
    By maxihost in forum Employment / Job Offers
    Replies: 9
    Last Post: 02-26-2007, 12:45 PM
  3. Can plesk restore cpanel backups?
    By slice16 in forum Hosting Software and Control Panels
    Replies: 6
    Last Post: 11-05-2006, 10:57 PM
  4. Shell script to replace hacked index page.
    By kbritt in forum Employment / Job Offers
    Replies: 6
    Last Post: 06-08-2005, 06:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts