Follow symbolic link on Linux

ocarles

ADSM.ORG Member
Joined
Jan 5, 2011
Messages
54
Reaction score
3
Points
0
Hi all!

I am testing backing up a folder which contains a soft symbolic link:

cd /tmp/testlink
ls -las
install -> /tmp/install
test.txt

tsm> q inclexcl
*** FILE INCLUDE/EXCLUDE ***
Mode Function Pattern (match from top down) Source File
---- --------- ------------------------------ -----------------
Excl Filespace /backup Server
Excl Filespace /usr/sap/trans Server
Excl Filespace /usr/sap/DEV Server
Excl Filespace /oracle/DEV/sapdata4 Server
Excl Filespace /oracle/DEV/sapdata3 Server
Excl Filespace /oracle/DEV/sapdata2 Server
Excl Filespace /oracle/DEV/sapdata1 Server
Excl Filespace /oracle/DEV/origlogB Server
Excl Filespace /oracle/DEV/origlogA Server
Excl Filespace /oracle/DEV/mirrlogB Server
Excl Filespace /oracle/DEV/mirrlogA Server
Excl Filespace /oracle Server
Excl Filespace /boot Server
Excl Filespace /dev Server
Excl Directory /.../.TsmCacheDir TSM
Include All /tmp/testlink/.../* Server
Exclude All /.../* Server
Exclude All /* Server
No DFS include/exclude statements defined.


With this, symbolic link "install" and test.txt file are backed up, but not /tmp/install, which is the where symbolic link points to on /tmp/testlink folder.

I also test with option FOLLOWSYMBOLIC yes on .opt file, but the same behavior...., also include.attribute.symlink insted include.

I thought that TSM follow symbolic links by default, but it seems that not.

TIA
 
I believe this is the correct behavior. The FOLLOWSYMBOLIC option is behaving the way it is suppose to work - the soft link install is followed and backed up. BUT you specifically excluded the REAL file from backup so it won't be backed up.

Try adding this to the dsm.opt file: Exclude /tmp/testlink/install
 
moon-buddy, are you sure? exclude /tmp/testlink/install?, I just want to include /tmp/testlink/*

OC
 
moon-buddy, are you sure? exclude /tmp/testlink/install?, I just want to include /tmp/testlink/*

OC


You want to exclude the files that the symbolic link points to, right? If so, the exclude statement is correct as it WILL not backup 'install' since there is no need to backup 'install'! I you want to backup '/tmp/install' via the symbolic link, remove the lines:

Exclude All /.../* Server
Exclude All /* Server

but you may need to specify individual folders to exclude. Or, specify by FS instead:

exclude.fs /
exclude.fs /usr

IF these have their own FS.
 
I want to include symbolic links /usr/sap/DEV/SYS/global and /usr/sap/DEV/SYS/profile which point to /sapmnt/DEV/global and /sapmnt/DEV/profile respectively.
I just try with this inclexcl list and it doesn't follow the link.

exclude.fs /dev
exclude.fs /boot
exclude.fs /backup
exclude.fs /oracle
exclude.fs /oracle/DEV/mirrlogA
exclude.fs /oracle/DEV/mirrlogB
exclude.fs /oracle/DEV/origlogA
exclude.fs /oracle/DEV/origlogB
exclude.fs /oracle/DEV/sapdata1
exclude.fs /oracle/DEV/sapdata2
exclude.fs /oracle/DEV/sapdata3
exclude.fs /oracle/DEV/sapdata4
exclude.dir /[abcdfgijklmnopqrstvw-z]*
exclude.dir /[A-Z]*
exclude.dir /home/[a-np-z]*
exclude.dir /usr/[a-rt-z]*
exclude.dir /usr/[A-Z]*
exclude.dir /usr/sbin
exclude.dir /usr/share
exclude.dir /usr/src
exclude /*
include /etc/* -subdir=yes BACKUP_FS01'
include /home/oradev/* -subdir=no BACKUP_FS01'
include /user/sap/* -subdir=yes BACKUP_FS01'
include /usr/sap/DEV/SYS/global/ -subdir=yes BACKUP_FS01'
include /usr/sap/DEV/SYS/profile/ -subdir=yes BACKUP_FS01'


As per TSM for Unix and Linux Backup-Archive Clients V6.2 installation and user guide pdf doc, page 170 Back up symbolic links, it shows that you have to terminate by a slash and use FOLLOWSYMBOLIC and SUBDIR in order to a get link followed.

TIA
 
I was testing something. If I execute from baclient: dsmc /usr/sap/DEV/SYS/global/ -subdir=yes. It follow the link and back ups all folder under /sapmnt/DEV/global.
But, when I try to use this on a dsm.sys: include /usr/sap/DEV/SYS/global/ -subdir=yes, it only back-ups the link reference, not the content.

What else can I test?

Regards
 
Back
Top