Backup option for public_html directory only?

In the backup options there is an option to backup "Server's home directory and web pages". I only want to backup the database and public_html directory for some clients, not include the home directory which is huge with all of the mail. Is it possible to add a separate option for "public_html" in there or is there a built in way I can accomplish this easily? Maybe just a checkbox that gets disabled if the "Server's home directory and web pages" is selected (since that would be redundant)?

Thanks for any thoughts, Steve

Status: 
Active

Comments

Hi Steve -- when you're setting up the backup, go into the "Features and settings" section of the backup page, and look for the option "Files to exclude from each domain".

You can use that to exclude files or directories from your backup. In your case, you can enter "Maildir" to exclude email from the backup.

Thanks, Eric. I think it still would be nice to have an option to backup only the web dir rather than excluding all others. Or possibly a second filter box to allow only includes? Just trying to make things easier on clients who don't know what all of this other stuff is and only care about their website/database.

Generally only the web and mail directories are of any significant size anyway .. so excluding everything else wouldn't gain much. I suppose we could add an option to exclude mailboxes, but that seems to go against the whole idea of creating backups - surely your customers don't want to lose their email?

Sure, but one is a full local backup (plus sent to inhouse data center backup storage) and the other (only web/databases) get backed to a remote location, cutting out their massive 3GB+ of just mail which is a lot to be sending via the net.

I just want vm to be as user friendly as possible to even the more technically challenged. This client understands what his database is and what his website is and what his email is. The rest of the stuff scares him. Simple backup options would be helpful for people like him.

I've set it up so only his public_html gets backed up and hes happy now. But I had to manually go through and exclude all other directories to do it. I just thought maybe there was an easier way for noobs so they can do more things themselves. Its not a huge deal. Just a convenience thing.

Thank you for the consideration.

I suppose an option could be added to limit the backup to only include certain directories .. I'll look into it.

Note that although his web files are located in public_html, he would actually need $HOME/etc and $HOME/cgi-bin (or $HOME/fcgi-bin) in order for his website to actually work correctly.

Jamie, if you opt to create that feature, I might suggest always backing up etc, cgi-bin, and fcgi-bin, as they're small, but also necessary for most websites to work.

I tried different methods and this worked perfectly. Please hit "Like" if it works for you as well.

Here is a solution:

Case I: Single Directory Exclude a directory from backups:

/home/example/public_html/docs/


Then syntax in "Files to exclude from each domain" should be:

public_html/docs


Case II: Multiple Directories Exclude multiple directories from backups:

/home/example/public_html/docs/
/home/example/public_html/var/
/home/example/domains/testbackups.example.com/public_html/media/cache/


Then syntax in "Files to exclude from each domain" should be:

public_html/docs
public_html/var
public_html/media/cache


Case III: Exclude file extensions

Exclude .exe .tar .tar.gz :


Then syntax in "Files to exclude from each domain" should be:

*.exe
*.tar
*.tar.gz


Case IV: All above cases at once

public_html/docs
public_html/var
public_html/media/cache
*.exe
*.tar
*.tar.gz


Note: These exclude files/directories are applicable globally for all websites/subdomains included in the backups. If you want to exclude the files/directories for website specific then you need to create schedule different backups for each domain.