nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Needed backup stript with solution for problem symlinks

This is a discussion on Needed backup stript with solution for problem symlinks within the Shell scripting forums, part of the Development/Scripting category; Hi everyone from Russia! I needed to backup data from directories with hyperlinks. All time I was used: tar cfhFF ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 10-03-2007, 04:01 PM
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
Sponsored Links
  #2 (permalink)  
Old 10-08-2007, 01:28 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

I recommend using rsync command for backup. It is not just easy to deal with softlinks but it is quite bandwidth saving too.
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 10-10-2007, 06:23 PM
Junior Member
User
 
Join Date: Oct 2007
My distro: Debian
Posts: 2
Rep Power: 0
texnikru is on a distinguished road
Default

Quote:
Originally Posted by nixcraft View Post
I recommend using rsync command for backup. It is not just easy to deal with softlinks but it is quite bandwidth saving too.
Thanks, I will try.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Need Solution aaru Linux software 0 10-19-2007 04:38 PM
problem with System + MySQL backup script massoo Shell scripting 1 08-20-2007 10:50 PM
Guidance needed jithendra Linux software 2 11-07-2006 10:26 AM
Device eth0 does not seem to be present error and solution jerry Linux software 1 06-20-2006 06:07 PM
using sed to delete everything except needed patterns guest Shell scripting 8 09-12-2005 03:57 AM


All times are GMT +5.5. The time now is 09:08 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36