These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Excluded Directories in scheduled backup? on the new forum.
When doing a manual backup for a specific domain there is the option of "Excluded Directories"..
I have a scheduled backup for all virtual servers. Is there a way to have Excluded Directories for each/specific domains using this method?
I want to automatically backup and exclude some directories. HOw can I do this.
I am using the GPL version/
Thanks
what seems to be working for me is - choose the server/domain in the dropdown menu on the top of virtualmin.
then go - Backup and Restore - click Excluded Directories - fill in the name of the directory to exclude in the right pane.
since I was a bit uncertain how and what to write, I did it like so to exclude the srcds directory:
home/mydomain.tld/srcds
srcds
for another domain i needed to exclude some video content in a joomla installation as they were to big to back up daily.
Because I didn't know how to write it exactly I just put the following in. Obviously I don't need all the lines, but haven't had the time yet to find out which line does the trick.
home/domainname/public_html/images/stories/videos/
domainname/public_html/images/stories/videos/
public_html/images/stories/videos/
images/stories/videos/
videos
the videos content is successfully excluded during daily (cron) backups.
anything in the error logs?
Have you set an email where to receive errors.
per haps filing a support ticket is best in this case
http://www.virtualmin.com/bug-tracker/
Thanks for the input.
Hmmm well I can't get the exclude to work at all even manually?
If my domain is blahblah.com:
path is /home/blahblah/public_html
I tried excluding:
home/blahblah/public_html/srcds
public_html/srcds
srcds/
Nothing worked
Also keep in mind there is no exclusion section for scheduled backups - this is what I want. directory exclusions aren't much help if they don't work in an automated fashion..
Well I did just exactly that yesterday and again today and it did not work... I wonder what is up?
where is the error log lol?
If you have your root alias set to something sane (like your personal email address), you will receive an email containing the results of all cronjobs, including backups.
--
Check out the forum guidelines!
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.