restore files for a single subdomain

mbrand

Verified User
Joined
Dec 11, 2006
Messages
10
Location
San Antonio, Texas, USA
At the User level, when using SiteBackup, is it possible to restore a single subdomain?

Say that two subdomains are used for development:
dev.domain.com
beta.domain.com

The idea is to restore just dev.domain.com while leaving beta.domain.com and domain.com unchanged.

If that is not possible at the User level, is it possible at the Reseller or Admin levels?

Thanks,
Mike
 
No. It's only possible manually. Download the backup file, unpack it, find the files you need to upload, and upload them again.

Jeff
 
No. It's only possible manually. Download the backup file, unpack it, find the files you need to upload, and upload them again.

Thanks, Jeff, for explaining that. Since that is the case, do you know what would be the easiest way to backup just a single subdomain so that entire subdomain (and only that subdomain) could be easily restored?

Thanks,
Mike
 
You can write your own script to tar up the subdomain directory.

For example, for subdomain sub.example.com belonging to user username:
Code:
#! /bin/bash
cd /home/username/domains/sub.example.com/public_html
tar -czf sub.example.com.tar.gz sub/ > /dev/null 2>&1
cd /home/username
mv domains/sub.example.com/public_html/sub.example.com.tar.gz .
Place that script into your main ftp directory (/home/username).
Then set up a cronjob to run it whenever you want the backup to be made.

Then you can ftp the backup from your /home/username directory.

This is a simplified scenario, and will make all backups the same name, overwriting the previous backup. You can of course make it as complex as you want ;) .

Jeff
 
Back
Top