Excluding multiple directories using 'virtualmin backup-domain'

hello all -

i am trying to create a backup that excludes a couple of directories. i have tried every combination i can think of to exclude multiple directories from the virtualmin backup-domain command:

–exclude public_html/dir1 --exclude public_html/dir2 (just excludes the first one)

–exclude “public_html/dir1 public_html/dir2” (from AI)
–exclude “public_html/dir1 , public_html/dir2” (from AI)

–exclude-from /tmp/exclude-list.txt (list below)

cat /tmp/exclude-list.txt;
public_html/dir1
public_html/dir1

please let me know if there is a way to exclude multiple directories using the
virtualmin backup-domain--exclude command.

SYSTEM INFORMATION
OS type and version RL-8.10
Webmin version 2.61
Virtualmin version 7.50.0 Professiona
Webserver version Apache/2.4.37
Related packages SUGGESTED

The first one you showed should work. Are you running this in a real terminal?

Looking at the code, it should be building an array of paths to exclude:

1 Like

Using multiple --exclude is the correct syntax. Do you have or -- for the first one?

That said, I checked the code and it all seems correct at first glance. Make sure that you really have -- in all cases placed before --exclude. Yet, I’d also expect command to fail with in it.

1 Like

DANG… sorry , the issue is user-error.

multiple --exclude is/are working perfectly, exactly as expected.

i certainly apologize for just assuming there was an issue, when in reality it was my supidity.

2 Likes

Ok glad you got it worked out!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.