I Cannot Restore My Domain From The Cpanel Backup.

dsouth

Registered
Aug 15, 2004
2
0
151
My webhost mentioned that it will take two hours of admin time to restore my 40 domains from backup because you need to create 40 tar.gz files from my servers backups. Here is a script to automate the process and make it take minutes instead.

This script **IS USED WHEN** the cpanel backup function does not create USER.tar.gz files and instead only backs up folders without tar archiving and gzip'ing them.

Hope you guys pass this one around because it really saved my butt. It is just a few lines..... :D :D

Code:
######   --- START SCRIPT ---  ######
#!/bin/sh
cd /backup/cpbackup/daily
for user in `ls`
do
tar -cpsz $user/* > /backup/cpbackup/daily/$user.tar.gz
done
######   --- END SCRIPT ---  ######

The real question is why didn't cpanel create the tar.gz when it made the daily backup???????