On Mon, Jun 30, 2014 at 8:10 PM, Joerg Schilling < joerg.schill...@fokus.fraunhofer.de> wrote: > Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Mon, Jun 30, 2014 at 6:42 PM, Joerg Schilling < > > joerg.schill...@fokus.fraunhofer.de> wrote: > > > It will create copies as Win-DOS does not support symlnks. > > > > For my usecase, I need it to maintain symlinks even after it gets > > untarred. I have noticed that WinRar is able to maintain symlinks > > after extraction. > > I am not sure how this should work, given the fact that Win-DOS does not > correctly support symlinks.
Internally the software uses junction points as mentioned in below link to create symlinks. http://www.codeproject.com/KB/winsdk/junctionpoints.aspx > See: > > http://msdn.microsoft.com/en-us/library/windows/desktop/aa363866%28v=vs.85%29.aspx > > On the other side, are you sure that winrar supports tar archives? No, it won't support tar format. I want to mention about the case when archive is created using WinRAR. Even though WinRAR can extract symlinks if archive is created originally with WinRAR, it doesn't serve my usecase because it can't do so if I try with archive created with tar which seems to be obvious. I have mentioned about WinRAR, just to highlight the case that on Windows symlinks can be extracted, so I think ideally it should be possible for tar to be extracted even if it contains symlinks by some other s/w on Windows. > You may like to check to list this archive: > > http://sourceforge.net/projects/s-tar/files/testscripts/pax-big-10g.tar.bz2/download > > and test whether the listing looks correctly, similar to this: > > 10737418240 -rw------- jes/glone Jun 15 23:18 2002 10g > 0 -rw-r--r-- jes/glone Jun 15 16:53 2002 file > star: 1048576 blocks + 3072 bytes (total of 10737421312 bytes = 10485763.00k). > > I would guess that winrar is unable to list both filenames. Output on extracting with WinRAR E:\basebackup>ls -l total 5 -rw-r--r-- 1 edb Administ 0 Jun 16 2002 10g -rw-r--r-- 1 edb Administ 110 Jun 30 20:20 @PaxHeader -rw-r--r-- 1 edb Administ 458 Jun 26 19:02 RM31185.txt -rw-r--r-- 1 edb Administ 7808 Jun 17 2002 pax-big-10g.tar.bz2 Output on extracting with tar.exe E:\basebackup>tar.exe -xvf pax-big-10g.tar.bz2 tar.exe: Record size = 2 blocks tar.exe: Extended header size=10737418240 is out of range 0..2147483647 10g tar.exe: Exiting with failure status due to previous errors With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com