Exclude files in folder, but include the folder

illllm

ADSM.ORG Member
Joined
Jan 9, 2018
Messages
153
Reaction score
2
Points
0
How do i exclude all files and sub-directories in a folder but include the folder itself in backups?
 
How do i exclude all files and sub-directories in a folder but include the folder itself in backups?
It does that by default. Exclude/include only affects files, the entire directory tree is backed up.

However, if you use exclude.dir, that excludes the directory, subdirectories and all files under it.
 
so if i say EXCLUDE /folder/

it will backup the folder but exclude the files ?
 
ok I tried many combinations but its not working

DOMAIN /fol1

EXCLUDE.DIR /fol1/fol2
EXCLUDE.DIR /fol1/fol3
EXCLUDE /fol1/fol3/dir2

this is the dsm.sys

i tried
exclude.file
exclude
exclude.file.backup

nothing works. The folder is not being backed up.
 
the exclude.dir is commented out.

the contents in the folder are randomly generated and adds up to about 500 TB to 1 PB, so we cannot exclude folder by folder.
 
So, the syntax I gave you excludes all the files in that directory and subdirectories, while still backing up the directory structure.
 
If you want to backup /fol1/fol3, but not the content, you could do:

Code:
EXCLUDE /fol1/fol3/*
EXCLUDE.DIR /fol1/fol3/*
First one excludes files in /fol1/fol3, but not subdirectories
Second excludes all subdirectories inside /fol1/fol3 and their files.
 
I tried this:

EXCLUDE.DIR /fol1/fol3/*

but the folder is not being backed up

I am going to ask the admins to create a file just for TSM and then add that file only to the backup list as an Include. This way the folder also will be backed up
 
Is that the only include/exclude in your option file? If not, there must be another one overriding this.

By default, everything is included until you start adding excludes. There could be excludes from the server as well.

Use this command to see the effective list of include exclude:
dsmc query inclexcl
 
Back
Top