[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8304
  • Last Modified:

What is @LongLink?

Hi,
I found a  @LongLink in a directory. What is  @LongLink? What do I do with this?
Thanks
Jamie
0
jamie_lynn
Asked:
jamie_lynn
  • 2
  • 2
1 Solution
 
yuzhCommented:
This is a known problem with Solaris tar, when a tar ball (contains long filename/path) and I recommend you to use GNU tar to handle long path/filename backup, you can download tne binary GNU tar package from:
http://sunfreeware.com/

or use cpio or unsdump/ufsrestore instead.
0
 
jamie_lynnAuthor Commented:
How did I get this@longlink in the first place? How would I use cpio or unsdump/ufsrestore? Could you give me the exact command to use them?
0
 
yuzhCommented:
>>How did I get this@longlink in the first place?

The problem is  that when you use the native Solaris tar to create the tar ball to backup files full path  exceeded 100 characters, and you try to use tar to extract the files from the tar ball, Solaris native tar could not restore the filename with path >= 101 char.

eg:
tar -cvf backup.tar /path-to/file
    Note: /path-to/file >=101 chars

when you do:
tar xvf backup.tar
it will cause the problem you have.

To work around:
Downdoa GNU tar (it is install in /usr/local/bin) from:
http://sunfreeware.com/

used:
/usr/local/bin/tar
to create and restore the tar ball.

How would I use cpio or unsdump/ufsrestore?
man cpio
man ufsdump/ufsrestore

PS: ufsdump/ufsrestore is good for system leve backup.

simple example:
to back use coip:
     cat /tmp/list | cpio -oacv > /tmp/machine-name.cpio
to restore
     cd /mydir
     cpio -icdmuv < machine-name.cpio

  Copy files to a tape:
        $ ls | cpio -oacv -O /dev/rmt/0n
 
        Extract file from the tape:
        $ cpio -icdmuv -I /dev/rmt/0n
 
        Verify what's on the tape
        $ cpio -ictv < /dev/rmt/0n
 
        cpio copy files from one dir to another dir:
        find . -print | cpio -oacv | (cd /backupdir; cpio -icdmuv )
 
Use ufsdump/ufsrestore:

Full backup to tape:
        mt -f /dev/rmt/0 rewind
         for fs in `df -Fufs|awk '{print $1}'`
         do
            ufsdump 0uf /dev/rmt/0n $fs
         done

 ufsrestore rf dev/rmt/0n

from one dir to other: (note that it is for whole filesystem!)
 ufsdump 0f - fs | ( cd /mydir ; ufsrestore rf -)

the man page should give enough examples.
0
 
jamie_lynnAuthor Commented:
Thanks!
Jamie
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now