To prevent bloated archive files, we excluded bunch of such file extensions in the Files to exclude from each domain
section as:
*.sql
*.gz
*.tgz
*.zip
*.tar
and everything works as expected. However, the backup system turned out to be enforcing the same exclusion rules against the destination backup directory. That's why the .backup
subdirectory is always missing the database file, because it is compressed in .gz
format. So as a temporary solution we have removed the .gz
extension from our exclusion list above.
However, often time users place any kind of archive files, including in .gz
format in home directories, which need to be excluded from regular backups. So please fix this bug in a way that will works just as it is working now, but without applying exclusion rules towards the backup destination directory.
Comments
Submitted by JamieCameron on Sat, 04/06/2019 - 21:55 Comment #1
Hmmm .. I'm not sure if we can solve this, because Virtualmin's exclusion feature uses a
tar
flag that skips matching files regardless of which directory they are in. And the current backup method puts MySQL, DNS and other dumps in the.backup
directory in.gz
format.Submitted by yngens on Mon, 04/15/2019 - 16:45 Comment #2
After reading your response, I first thought of one possible solution: to backup everything, but databases first, just the way it works now, and then only backup databases separately and then add to tar file. But then I searched little bit on a subject and found out that
tar
also has--include
counterpart of--exclude
, so you could just use it.Submitted by andreychek on Mon, 04/08/2019 - 09:28 Comment #3
Passing this along to Joe for further comment.
Submitted by JamieCameron on Mon, 04/08/2019 - 22:24 Comment #4
Using --include isn't a bad idea .. let me see if that would work.
Submitted by JamieCameron on Mon, 04/08/2019 - 22:26 Comment #5
Actually, on my system (CentOS 7) there is no
--include
flag to tar. So if it does exist, it must only be in later versions.