Created
May 23, 2012 16:39
-
-
Save JosephRedfern/2776271 to your computer and use it in GitHub Desktop.
cPanel public_html backup extractor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#This script assumes that your cPanel backup tarball is in the same directory as your public_html folder | |
#It doesn't do any verification, and will just quit if something goes wrong (due to set -e). | |
#Use at your own risk! | |
set -e | |
echo "Extracting Backup! If you dont see the message: All done!, then something has gone wrong." | |
cd $1 | |
tar -xf back* | |
cd back* | |
tar -xf homedir.tar | |
cp -r public_html/* ../public_html/ | |
echo "All done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used it like this:
cat sites.txt|xargs -I {} ./putbackup.sh {}
Where sites.txt was a list of the domains I had backed up, which was held in a folder which also held folders named after each domain, which held the backup tarball and public_html folder.