Exclude directorys from scheduled backups

2 posts / 0 new
Last post
#1 Tue, 06/26/2007 - 11:15
JohnWolgamot

Exclude directorys from scheduled backups

I would find it helpful if there was a way to exclude "from scheduled backups" a list of directories and/or files which are contained in the public_html dir or for that matter anywhere within your home directory.

This way for example, if I were to place a large video or other type of large file online then it won't get backed up every night to the the Amazon S3 server saving S3 storage and bandwidth charges.

Sat, 06/16/2018 - 05:58
pragma

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.