Exclude Large Video files from backup

Tried to search but this seems never discussed, how can I exclude

  1. certain file types like MOV, MKV, MP4 video files
  2. Files LARGER THAN ‘’ mb in size?

If anyone has tried this earlier, I’d love to know ways to do this.

Thanks

Hestia doesn’t support excluding files by size.

You can add exclusions to the user’s backup (keep in mind that exclusions are case sensitive).

Example to exclude files with extensions mov, MOV, mkv, and MKV for all domains owned by the user in web dir:

For Web Dolmains:

*:*.mov:*.MOV:*.mkv:*.MKV

For User Directory:

*.mov
*.MOV
*.mkv
*.MKV

Many thanks @sahsanu for the detailed help. I tried to put the exclusions as you advised in both WEB and USER DIRECTORY sections, however, it still IGNORES these and includes all mov files.

The backup log also states

2024-01-11 16:54:44 excluding file *.mov
2024-01-11 16:54:44 excluding file *.MOV
2024-01-11 16:54:44 excluding file *.mkv
2024-01-11 16:54:44 excluding file *.MKV

Which means the exclusions were registered, but not being ‘honoured’ by the backup script. Any ideas to improve here?

Before my previous post I tested it in my server and it worked.

Could you please show the output of this command? (replace YourUser by your actual user).

cat /usr/local/hestia/data/users/YourUser/backup-excludes.conf

Could you please show the name and full path of one of those mov files?

sure, here it is

WEB='*:*.mov:*.MOV:*.mkv:*.MKV'
DNS=''
MAIL=''
DB=''
CRON=''
USER='*.mov,*.MOV,*.mkv,*.MKV'

But… the name of the files are *.mov: sizeM or are you using some script or command to list the files that also shows the size?

Sorry thats just a find query to get files over +20mb size

find . -type f -size +20M -exec ls -lh {} \; | awk '{ print $NF ": " $5 }' | sort -rh

Ok, I tested it right now with one of your files and it was not included in the backup so I can’t reproduce the issue.