I am running NextCloud with a rather large amount of data located outside the /home/nc directory (outside /home/nc/public_html/data/).
This data area is only referenced in the nextCloud database and is located in /data/nc.
The large part (1.3T) is located in /data/nc/Harald
The size of data exceeds the /tmp size, and backup fails due to /tmp full.
I have tried with these different specs (unquoted) in the "Files to exclude from each domain" field: "Harald", "/data/nc", "\/data\/nc"
But none of these seems to work.
During backup /tmp grows until full, and lsof shows:
...
sh 28687 root cwd DIR 253,2 132 6446628114 /data/nc/Harald/files
tar 28688 root cwd DIR 253,2 132 6446628114 /data/nc/Harald/files
tar 28688 root 4r DIR 253,2 132 6446628114 /data/nc/Harald/files
tar 28688 root 5r DIR 253,2 161 2147487410 /data/nc/Harald/files/D
tar 28688 root 6r DIR 253,2 325 4294969624 /data/nc/Harald/files/D/d3
tar 28688 root 7r DIR 253,2 99 10749494565 /data/nc/Harald/files/D/d3/lydbøger
tar 28688 root 8r DIR 253,2 8192 6661044 /data/nc/Harald/files/D/d3/lydbøger/læste
tar 28688 root 9r DIR 253,2 4096 6456874600 /data/nc/Harald/files/D/d3/lydbøger/læste/Camilla Grebe
tar 28688 root 10r REG 253,2 21670016 6456874614 /data/nc/Harald/files/D/d3/lydbøger/læste/Camilla Grebe/Camilla Grebe - Jeg ser dig - 13.mp3
...
I have searched /home/nc for links to /data/nc, but found none.
/data/nc is owned by the nc account - that is the only clue, I can see, that the backup function finds these external files.
How do I exclude this external data area, which I backup by other means?
Thank you in advance.
/ Harald
cannot make backup exclude file function work
Submitted by hvillemoes on Thu, 06/14/2018 - 02:47 Pro Licensee
Status:
Closed (fixed)
Comments
Submitted by andreychek on Thu, 06/14/2018 - 09:58 Comment #1
Howdy -- hmm, is that perhaps a home directory for an account associated with the domain?
Virtualmin normally wouldn't backup anything outside of the home directory (even in the case of a symlink pointing there)... but if it's set as a home directory, I wonder if that could be doing it.
What is the output of this command:
grep Harald /etc/passwd
Submitted by pragma on Sat, 06/16/2018 - 05:58 Comment #2
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.
Submitted by hvillemoes on Fri, 07/06/2018 - 14:12 Pro Licensee Comment #3
Thank you for this very fine documentation. I found my problem to be an unattended softlink from public_html to the directory, I wanted to exclude. When I included that softlink in the exclusion-list everything worked fine. Thank you for a fine product, which saves me a great deal of time in my daily work, and for the helpful support.
Submitted by hvillemoes on Fri, 07/06/2018 - 14:12 Pro Licensee Comment #4