How to Exclude Folders from Backup?

Backup, Restore, Netbak Replicator, Cloud Storage Services
philippe406
New here
Posts: 8
Joined: Sat Sep 16, 2017 2:56 pm

Re: How to Exclude Folders from Backup?

Post by philippe406 »

Hi

Thanks for this post. In my case I wanted to exclude some folders because "Hybrid Backup Sync" was giving me some warnings saying that it was unable to copy some files. So I've followed the methods given here and I was able to get this to work. I'll give an example:

Lets say I want to exclude the following folders located at different places in my hard drive:

Exclude-folder-1
Exclude-folder-2
Exclude-folder-3

As you can see I didn't leave any spaces when naming the folders. I didn't try with spaces but I guess I have to find a way (as given above by another guy) to fill the space by a character (I think it was back pace). Anyway let's say that my folders don't have spaces in their names. To exclude these from being backed up, I just go to "Edit sync job" -> " Filter" -> and I check the box "other". Now in the field I exactly put the folders in the following way:

/Exclude-folder-1 /Exclude-folder-2 /Exclude-folder-3

This did the job for me. No more warnings when backing up with Hybrid Backup sync. These folders was manually copied at once and they will not be modified in my case by Hybride Backup sync. If one day I modify their sources folders, then I have to copy them back manually using my computer.

Hope this will help other people here.
asteynberg
Starting out
Posts: 23
Joined: Wed Mar 27, 2013 10:17 pm

Re: How to Exclude Folders from Backup?

Post by asteynberg »

I've been trying to get the above method and various other method in this thread to work with a Cloud Job on HBS.
As described I try to add in a folder location under the Filter > File Type Filter > Excluding but when trying to apply the changes a notice comes up saying "Please enter file types" ?

I want to exclude the Recycle Bin inside a folder, so for example : \\My Folder\Recycle, how do I achieve this in HBS?
QNAP TS-459U+
Firmware Version 4.2.6 Build 20170905
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: How to Exclude Folders from Backup?

Post by storageman »

asteynberg wrote:I've been trying to get the above method and various other method in this thread to work with a Cloud Job on HBS.
As described I try to add in a folder location under the Filter > File Type Filter > Excluding but when trying to apply the changes a notice comes up saying "Please enter file types" ?

I want to exclude the Recycle Bin inside a folder, so for example : \\My Folder\Recycle, how do I achieve this in HBS?
Just untick show recycle in File Station Settings first.
asteynberg
Starting out
Posts: 23
Joined: Wed Mar 27, 2013 10:17 pm

Re: How to Exclude Folders from Backup?

Post by asteynberg »

storageman wrote:
asteynberg wrote:I've been trying to get the above method and various other method in this thread to work with a Cloud Job on HBS.
As described I try to add in a folder location under the Filter > File Type Filter > Excluding but when trying to apply the changes a notice comes up saying "Please enter file types" ?

I want to exclude the Recycle Bin inside a folder, so for example : \\My Folder\Recycle, how do I achieve this in HBS?
Just untick show recycle in File Station Settings first.
Ah I see so if I untick the Show Recyle option its automatically excluded due to HBS not including any hidden folders, excellent thanks very much!
QNAP TS-459U+
Firmware Version 4.2.6 Build 20170905
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: How to Exclude Folders from Backup?

Post by storageman »

asteynberg wrote:
storageman wrote:
asteynberg wrote:I've been trying to get the above method and various other method in this thread to work with a Cloud Job on HBS.
As described I try to add in a folder location under the Filter > File Type Filter > Excluding but when trying to apply the changes a notice comes up saying "Please enter file types" ?

I want to exclude the Recycle Bin inside a folder, so for example : \\My Folder\Recycle, how do I achieve this in HBS?
Just untick show recycle in File Station Settings first.
Ah I see so if I untick the Show Recyle option its automatically excluded due to HBS not including any hidden folders, excellent thanks very much!
You're welcome, your question helped my understanding too!
adrienjamin
First post
Posts: 1
Joined: Sun Sep 07, 2014 11:10 pm

Re: How to Exclude Folders from Backup?

Post by adrienjamin »

Hi,
regarding the whitespaces I tried to use the escape characters "\" and it seemed to have worked.
So basically, to exclude the folder "My Excluded Folder", one has to go to edit -> Filters -> Excluded Files Type -> Others and write /My\ Excluded\ Folder
From what I understand from the previous comments the entries are whitespace separated therefore to exclude many folders it should be like this:
"/My\ First\ Excluded\ Folder /My\ /Second\ Excluded\ Folder"
Best of luck!
dave1892
Starting out
Posts: 28
Joined: Wed Feb 17, 2010 12:54 am

Re: How to Exclude Folders from Backup?

Post by dave1892 »

So does anyone have a definitive answer for the syntax for excluding folders?

I can't get it to work at all. See log below trying to exclude folder xx

[2020/10/22 10:14:09] Other denying files(case-insensitive): /xx/,*/xx/*,/Public/qq/xx,/Public/qq/xx/,/Public/qq/xx/*.
[2020/10/22 10:14:09] Create the "eSATADisk1/Public/qq/xx" directory.
[2020/10/22 10:14:09] Create the "eSATADisk1/Public/qq/file1" file.
[2020/10/22 10:14:09] Create the "eSATADisk1/Public/qq/xx/file2" file.
[2020/10/22 10:14:10] The synchronization is finished.

This is on a QNAP 239 pro-II, version 4.2.6 build 20200821

Going to an external esata drive with ext4. Using Backup Station / External Drive

Pair is Pair1 = [Public/qq, eSATADisk1/Public/qq].

many thanks
Dave
AriZoNaiCe
New here
Posts: 3
Joined: Thu Mar 24, 2016 2:28 am

Re: How to Exclude Folders from Backup?

Post by AriZoNaiCe »

dave1892 wrote: Thu Oct 22, 2020 5:39 pm So does anyone have a definitive answer for the syntax for excluding folders?

I can't get it to work at all. See log below trying to exclude folder xx

[2020/10/22 10:14:09] Other denying files(case-insensitive): /xx/,*/xx/*,/Public/qq/xx,/Public/qq/xx/,/Public/qq/xx/*.
[2020/10/22 10:14:09] Create the "eSATADisk1/Public/qq/xx" directory.
[2020/10/22 10:14:09] Create the "eSATADisk1/Public/qq/file1" file.
[2020/10/22 10:14:09] Create the "eSATADisk1/Public/qq/xx/file2" file.
[2020/10/22 10:14:10] The synchronization is finished.

This is on a QNAP 239 pro-II, version 4.2.6 build 20200821

Going to an external esata drive with ext4. Using Backup Station / External Drive

Pair is Pair1 = [Public/qq, eSATADisk1/Public/qq].

many thanks
Dave
Hi Dave -- I believe the answers are scattered throughout the thread, but they are here. I'll try to summarize to make it easier for people to find:
1. Excluding a folder does not require the full path to the folder. You would only provide the folder name with a leading slash.
a Ex: To exclude the folder "/Media/Images/UnnecessaryImages", you would provide just "/UnnecessaryImages" (no quotes)
^ The caveat to this is that if you have more than on UnnecessaryImages folders being backed up, and you wanted to exclude one but not the other, this is not possible.
b. Providing the full path to the folder seems not to work. It should just be the slash and the folder name.
2. To exclude a folder that has spaces in the name, you must use the "escape character" before the space.
a: Ex: To exclude the folder "/Media/Videos/My Unneeded Videos", you would use "/Media/Videos/My\ Unneeded\ Videos" (no quotes)
3. To exclude more than one folder, a space is the delimiter/separator.
a: Ex: To exclude the two folders "/Media/Videos/Exclude1" and "/Media/Videos/Exclude Me 2", it would look like this: "/Exclude1 /Exclude\ Me\ 2" (no quotes)

I don't think it's the cleanest implementation, but it does work. It should be simpler and more robust.

Hope that helps some other people to figure this out more quickly/easily.

Thank you.

-- Brian
spacesimon
Starting out
Posts: 36
Joined: Thu Jan 12, 2017 8:53 pm

Re: How to Exclude Folders from Backup?

Post by spacesimon »

I have reported issues with folder exclusion recently with support. This is not "within spec" apparently now in HBS3.

My destination was Cloud storage and another LAN based QNAP.

Not sure how anyones getting this to work with latest firmware/hbs3
SamChameleon
New here
Posts: 2
Joined: Sun Dec 30, 2018 6:34 pm

Re: How to Exclude Folders from Backup?

Post by SamChameleon »

The above described solution does not work in my case. I want to exclude subfolders in my photo collection. I have a folder per "photo session", e.g. "Barcelona“, "Paris", etc

In these folders I have subfolders containing the raw files and others called _raw, _hdr, etc

I want to exclude these subfolders due to space reasons on the backup NAS. Therefore, I put the foldernames in the exclude field. I tried both, _raw and /_raw and separated the folders with blanks, eg _raw _hdr _test or /_raw /_hdr

In any case the folders were synced. Any additional hints? Maybe the leading _ is a problem?
wazzaworld
Starting out
Posts: 12
Joined: Sat Sep 02, 2017 5:49 am

Re: How to Exclude Folders from Backup?

Post by wazzaworld »

Pretty sure I have filtered out folders with _ before. In my setting, though, I use commas to separate the different exclusions, not spaces.

Maybe try this:

/_raw, /_hdr

Otherwise, test it out by using one folder on its own first.

I don't think you need to, but escaping the _ might help. E.g. /\_raw, /\_hdr.
Post Reply

Return to “Backup & Restore”