Hello guys,
I am experiencing some strange behavior with Virtualmin Backups. I have a user named domains which has a directory in /home/mydomain.tld/homes/domains . When I perform a full backup for this virtual server, this domains directory is missing from the backup.
I first noticed this when transferring between 2 virtualmin 3.93 PRO systems. The IMAP account for the domains user had folders on the original system but after performing a Cloudmin transfer to another system they were all missing. I then decided to see if the directory existed in the backups and sure enough it wasn't. I then made doubly sure and performed a full backup about 10 minutes ago to make sure it wasn't some oddity and again it is missing.
I know there is a folder named domains directly under the virtual server home directory also, however this too is missing in the backups.
Thx,
~Jeremy
Comments
Submitted by JamieCameron on Tue, 08/07/2012 - 12:51 Comment #1
That's a side-effect of the way the top level
domains
directory is excluded from backup. Because the tar command used for backups can only exclude based on relative directory names, this means that the home of a user nameddomains
will also be excluded :-(The only work-around I can offer is to rename this user, and create a mail alias named
domains
that forwards email to him.Submitted by xtremeservices on Tue, 08/07/2012 - 12:54 Comment #2
Hmm,
I will give that a shot. Might be a good idea to warn of this side affect during user creation.
~Jeremy
Submitted by JamieCameron on Tue, 08/07/2012 - 17:35 Comment #3
I will add a check to prevent the creation of a username like this in the next Virtualmin release.
Submitted by Issues on Tue, 08/21/2012 - 17:46 Comment #4
Automatically closed -- issue fixed for 2 weeks with no activity.
Submitted by pragma on Sat, 06/16/2018 - 05:59 Comment #5
I tried different methods and this worked perfectly. Please hit "Like" if it works for you as well.
Here is a solution:![](http://www.pragmasoftwares.com/wp-content/uploads/2018/06/virtualmin-backup-exclusion.png)
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.