I'm trying to set up a scheduled backup for a portrait studio website, which has a very large number of photos uploaded to one specific directory (and in various subdirectories of that one directory). That directory comes to about 26GB, all together. Much fun. :)
I'm going to backup up that directory via RSYNC, as it's added to little by little, but hardly ever changed.
I'd like to exclude that directory from the backup - and see that there's a built in feature to do that, but I cannot seem to make it work properly.
The virtual server that I'm attempting to back up is a subserver of another domain. I've tried putting the exclusion in as:
/home/username/domains/domain.com/public_html/photos
/home/username/domains/domain.com/public_html/photos/domains/domain.com/public_html/photos
domains/domain.com/public_html/photos/
public_html/photos
public_html/photos/
Yet, it doesn't seem to exclude the folder. The backup will start, and go on, and on.. and temp folder that webmin is working with will grow to the point where it sure looks like it's backing up all 26GB (the temp folder grows to about 15gb usually before I stop it).
I've seen it suggested to move the large folder outside of the servers' home, and I could do that - but it would take a lot of file moving and a bit of reconfiguration - so if I can simply get the syntax right and get the exclusion to work - that would be ideal.
Any other suggestions?
There's a browse button on the directory exclusions page. Could you not use the file browser to choose the correct folder, which would then, hoepfully, enter the correct relative format into the field?
That sounds like a fantastic solution.
Except... no browse button here. Virtualmin 3.83, checked on Pro and GPL machines. Just a textarea box to type in.
Is it there only in certain themes? I'm using the default "Virtualmin Framed Theme".
3.83 Pro here, same, default VM framed theme. Definitely a '...' button next to the edit field. I can't tell you the exact positioning of it, sorry, as I'm visually impaired. But it's definitely there.
I wonder if we're looking in two different spots.
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.