EXCLUDE.DIR????

xefil

ADSM.ORG Member
Joined
Nov 3, 2005
Messages
46
Reaction score
0
Points
0
Website
Visit site
Hello to all!



I would like to backup only one directory under LINUX and so I use the following commands:



EXCLUDE /.../*

INCLUDE /root/MYSQL-BACKUP/.../*



So it works, only the files are saved, but the client sent to the server ALL directory structure, even if I don't want it. Also I've added the first line:



EXCLUDE.DIR /.../*

EXCLUDE /.../*

INCLUDE /root/MYSQL-BACKUP/.../*



But so NOTHING will be saved, an error occure:

ANS1115W File '' excluded by Include/Exclude list



Can someone help me to set the right syntax to backup ONLY one directory and it's content, without all the resto of the directory structure on the server?



Thank's a lot



Simon
 
Hey Simon,



I haven't used the Include/Exclude files extensively myself but to me it seems to make more sense to edit your INCLUDES file and configure your dsm.sys (or is i the .opt?) file to point to it. Otherwise, I can give you the command well enough to just backup that single directory:



dsmc sel "/directory/*" -su=yes



This will perform a SELECTIVE backup of every file in "/directory", including files sub-directories (that's what the -su=yes options is for)



You will probably want to learn how to use th eINCLUDES and EXCLUDES to your advantage, but someone else may have a better understanding of it than I do



--JB
 
Sorry, I'm not fully awake yet. Have you tried:



INCLUDE /root/MYSQL-BACKUP/*



or



dsmc sel "/root/MYSQL-BACKUP/*" -su=yes
 
I've configured on every server (more backups) the scheduler, also all this is saved into my dsm.sys file:



Exactly here my file:

------------------------------------------------

SERVERNAME SERVER1

PASSWORDACCESS GENERATE

MANAGEDSERVICES WEBCLIENT

DOMAIN ALL-LOCAL



TXNBYTELIMIT 17408

httpport 1581

commmethod tcpip

tcpport 1500

tcpserveraddress 172.18.26.7

nodename MASTERSQL



TXNBYTELIMIT 2097152

TCPCLIENTADDRESS 172.18.27.9



SCHEDMODE PROMPTED

TCPBUFFSIZE 512

TCPWINDOWSIZE 2048

SCHEDLOGRETENTION 5 D





EXCLUDE /.../*

INCLUDE /root/MYSQL-BACKUP/.../*





------------------------------------------------------



Adding "EXCLUDE.DIR /.../*" before my first "EXCLUDE /.../*" nothing will saved, as descrived.

This is the reason why I would like to use the EXCLUDE/INCLUDE options.



Thank's :)



Simon
 
Are you able to back the directory up normally, outside of a schedule scenario? I'm sure you already know about the problems backing up SQLobjects currently in use, hence the "Backup" folder, but I thought I'd ask anyway.
 
Don't worry, it's a DUMP :)

I know it's not safe to backup DB in use ;)



Also hope to receive help with the right INCLUDE-exclude syntax.



Thank's,



Simon
 
Hello!



Also noone has an idea how to set a right syntax for my problem?



Plssss :'(



Simon
 
Hi,



the problem is, that EXCLUDE.DIR statements are processed 1st, regardless to the possition where are written. Therefore all directories are excluded and your INCLUDE does not matter.



I see it is a LINUX box, so I'd recommend you to use VIRTUALMOUNTPOINT and do the constraint at the DOMAIN level:



dsm.sys:

[...]

VIRTUALM=/root/MYSQL-BACKUP

DOMAIN=/root/MYSQL-BACKUP

[...]

no include/exclude statements...



Than you can just run DSMC INCREMENTAL and enjoy backing up your only one directory :)



Hope it helps..
 
REALLY thank's!



I'll try it now!! :)



Can I ask something more? Only two quetions :)



I use these directives into dsm.sys to make archive as well:



EXCLUDE.ARCHIVE "/.../*" MANCLASS_SYSAK

INCLUDE.ARCHIVE "/root/MYSQL-BACKUP/.../*" MANCLASS_SYSAK



On the Server is specified (into scheduler) to make a weekly archive with Option "-subdir=yes" and Objects "/* "

Setting the two include.archive-exclude.archive lines it has always worked and ONLY the MYSQL-BACKUP is archived.

Now, setting a virtualdomain, it works for the archive too? I don't need to specify the include/exclude settings?



Other thing... If I want to use another management class, I've specified it after the include statement. If I specify nothing, how tell the client to use another management class?





Simon
 
I don't work with archives, so my experience with them is almost zero.



If you want to do archives, you can keep the include/exclude statements. If it worked well, it will work well again with them. Just keep virtualmountpoint and domain for backups and incl/excl.archive for archives...
 
Thank's! Next sunnday I'll see the result of the archive ;)



Bye and have a nice week-end.



Simon
 
Hello!



I've tested archive too, but it doesn't work with virtualmountpoints.

I want to backup the folder "/root/MYSQL-BACKUP/" (and subfolders).

So here my dsm.sys:



------------------------------------------

SERVERNAME SERVER1

PASSWORDACCESS GENERATE

MANAGEDSERVICES WEBCLIENT

VIRTUALM "/root/MYSQL-BACKUP"

DOMAIN "/root/MYSQL-BACKUP"



TXNBYTELIMIT 17408

httpport 1581

commmethod tcpip

tcpport 1500

tcpserveraddress 172.18.26.7

nodename MASTERSQL



TXNBYTELIMIT 2097152

TCPCLIENTADDRESS 172.18.27.9



SCHEDMODE PROMPTED

TCPBUFFSIZE 512

TCPWINDOWSIZE 2048

SCHEDLOGRETENTION 5 D

------------------------------------------



For Backup:



The Virtualmoutpoints indicated at the top of the dsm.sys are used to backup the desired folder. I don't need any INCLUDE/EXCLUDE (thank's crazymad!). It works.



For Archive:



I've used from the server an ARCHIVE scheduler with Option "-subdir=yes" and Objects "/* ", and into dsm.sys these two lines:

EXCLUDE.ARCHIVE "/.../*" MANCLASS_SYSAK

INCLUDE.ARCHIVE "/root/MYSQL-BACKUP/.../*" MANCLASS_SYSAK

It has always worked with dsm.sys files without virtualmountpoints, but now it doesn't work. Into the dsmsched.log, during the archive operation, all folders and files are logged with this error:

ANS1115W <file and folder> excluded by Include/Exclude list

All logged except the "/root/MYSQL-BACKUP" folder. Not logged, not archived.



Also to archive I need to create a scheduler with Option "-subdir=yes" and Objects "/root/MYSQL-BACKUP/*" directly from the server.

So it works, but It was better to create a standard scheduler from the server and specify all inclexcl from dsm.sys (backup and archive too).



In syntax:



To backup/archive clearly ONLY the folder I need without all the empty folders I must create virtualmountpoints into dsm.sys for backup and create appropriate scheduler on the server for archive.



I've no idea why :)



Any suggestion would be appreciated.



Bye Simon
 
Hi xefil,



I never could see any effect of the include.archive and exclude.archive.



Therefore I use a Perl script to build a filelist and call dsmc from within this script:



<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> $cmdline = "dsmc archive -description=\"$ArchDescr\" -archmc=$ArchMC -filelist=$FileList >$logfile";

$rc = system("$cmdline"); </PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>



... and exclude.dir has very different effects whether there is a trailing "/" or not. For me it is best to write

<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>exclude.dir /db/dir1/tmp</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>

or

<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>exclude.dir /db/.../tmp</PRE></FONT></TD></TR><TR><TD><HR></TD></TR></TABLE>

without anything at the end. Although someone told me /.../ could not be used with exclude.dir



I still haven't found a really good documentation concerning include/ecxlude :confused:
 
Thank's Sunhillow!



I'll try little bit with scripts too! :)



Byebye, Simon
 
Dear Simon,



I am not quite familar with the Linux Settings. But we do something similar in Windows.



What you might need to do is create new Clientoption set. Set your include &amp; exclude directories. You would have the option of precedence.



Option: INCLEXCL

Sequence number: 30

Override: Yes

Option Value: exclude H:\USR\USERS\SAPINT\SAPTOIFM\*.*



Option: INCLEXCL

Sequence number: 31

Override: Yes

Option Value: include *:\USR\USERS\SAPINT\SAPTOIFM\*.DES



This would still result in including *.DES files from all directory. Override option would help you to include/exclude if you have set something locally on one particular server. For instance your server named Charlie needs a different setting then override should be set to yes in clientoptionset.



Set the created client option set to the client. Note the sequence number would give a precedence in which they are excluded/included.



The advantage of this you need not set option on all the servers. Create one option set in the server assign it to the particular set of clients from server itself. There you go :)
 
Thank's for the replies, now I have what I need to find an appropiate solution ;)



Simon
 
Back
Top