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 -------------- |
|
Powered by
KnowledgebasePublisher (Knowledgebase software)

