View Single Post

  #1 (permalink)  
Old 10-03-2007, 04:01 PM
texnikru texnikru is offline
Junior Member
User
 
Join Date: Oct 2007
My distro: Debian
Posts: 2
Rep Power: 0
texnikru is on a distinguished road
Question Needed backup stript with solution for problem symlinks

Hi everyone from Russia!

I needed to backup data from directories with hyperlinks. All time I was used:
tar cfhFF archive.tar *
i.e. compress all files with hyperlinks follow without "trash" files

But some directories I cannot archive die loop hyperlinks, i.e.:
/somedir -> .

When I try to archive simular directories - tar trying again and again enter to this directory and /somedir/somedir/somedir/somedir/somedir.... etc ...archiving in impossible in this case.

I think this can be solved with scripts that can use readlink to validate loop hperlinks and ignore this. Can you please help me? I does not have any expirience with scripting.
Reply With Quote