Exclude Specific File Extensions, Under A Specific Folders

Hi team,

I’ve moved over to Duplicacy from Borgbackup, and quite happy with it.

I did need some help with setting up filters.

I have backed up Snapshots (.img and .xz) located under several different folders i.e

/mnt/backup/ImageBackup/vm1
/mnt/backup/ImageBackup/vm2
/mnt/backup/ImageBackup/vm3
/mnt/backup/ImageBackup/vm4

I’m trying to figure out how to only backup the .xz images and to exclude the .img images.

I’ve seen this post: Duplicacy Issue: Exclude Temp folders

which explains to use regex patterns to exclude folders with the name temp. So I believe thats the direction I need to go, but was looking for help from this kind community on how to only exclude .img files from all folders under
/mnt/backup/ImageBackup

Thank you

I am pretty sure that * matches path separators, so you don’t need to go regexp route, this should be enough:

-/mnt/backup/ImageBackup/*.img

Ok let me give this a test,

Thank you

Thank you for your help with this, I’ve been trying since the morning to get this to work, but sadly it’s not picking the filter.

Reading this: All paths are relative to the repository (the folder you execute duplicacy from), without a leading “/”

So my repository is

/mnt/

And as mentioned, I’m trying to exclude files in this directory:
/mnt/backup/ImageBackup

I’ve tried the suggestion
-/mnt/backup/ImageBackup/.img*

But that also excluded the .xz files that I wanted to be backed up.

I looked at this post: Duplicacy Issue: Filter common subfolders

And thought that’s pretty much what I wanted to do, backup all the .xz files in a specific folder and it’s sub folders, and exclude any .img files.

But that didn’t seem to work for me.

My folder names aren’t simple either, and contain spaces:

i.e: /mnt/backup/Image Backup/
And I tried also escaping the spaces:
/mnt/backup/Image\ Backup/

But didn’t have any luck

This was not the suggestion, the suggestion was

-/mnt/backup/ImageBackup/*.img

and given that your repository is at /mnt it should be

-backup/ImageBackup/*.img

Hi @sevimo

Thank you for your patience, I spent a bit more time with this, and did some basic tests by trying to exclude files at the base of my repository and then gradually moving them into the desired location and checking if they were still be excluded.

That is now working, and is such a relief.

Thank you again for helping with this,