Backup exclusion doesn't seem to work on multiple folders?

Hi,

I have a script I run to disable web backups (public_html and cgi-bin) for each user :

#!/bin/bash
source /etc/hestiacp/hestia.conf
source $HESTIA/func/main.sh

echo "WEB='*:public_html,*:cgi-bin'" > /tmp/backup_exclusions

for user in $($BIN/v-list-users plain | cut -f1 ); do
    echo "Doing user: $user"
    $BIN/v-update-user-backup-exclusions $user /tmp/backup_exclusions
done

If I look in /usr/local/hestia/data/users/athertons/backup-excludes.conf, I correctly see:

WEB=‘:public_html,:cgi-bin’

Yet the web interface seems to miss the first one?

If I do the edit from the GUI, it saves the same. However, when I reload the page I only see one of them again:

*:public_html

It seems to be a bug with multiple exclusions after my last PR tweak to v-backup-user:

-- WEB --
2023-01-28 09:24:00 athertons.co.uk
2023-01-28 09:24:00 excluding directory public_html
2023-01-28 09:24:00 excluding file *
2023-01-28 09:24:00 excluding directory cgi-bin
2023-01-28 09:24:00 *** 1 domain ***

The rule is:

WEB='*:public_html,*:cgi-bin'

If it just has one rule it works as expected:

-- WEB --
2023-01-28 09:25:34 athertons.co.uk
2023-01-28 09:25:34 excluding directory public_html
2023-01-28 09:25:34 *** 1 domain ***

So I’m thinking there must be another tweak needed for the , in the seperator?

You syntax is wrong :slight_smile:
WEB=‘*:public_html,*:cgi-bin’

*:public_html:cgi-bin

should work

Just checked:

2023-01-28 10:51:54 xxxxxx
2023-01-28 10:51:54 excluding directory public_html
2023-01-28 10:51:54 excluding directory cgi-bin
2023-01-28 10:51:54 *** 1 domain ***

Ahhh that’d explain it then :slight_smile: I assumed it was one rule per line. Makes more sense how you have it! Worked properly this time:

– WEB –
2023-01-28 10:48:35 athertons.co.uk
2023-01-28 10:48:35 excluding directory public_html
2023-01-28 10:48:35 excluding directory cgi-bin
2023-01-28 10:48:35 *** 1 domain ***

:sunglasses:

If you have multiple domains it works like:
domain1:xxxx,domain2:xxxx and so on…

1 Like

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