LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-18-2013, 11:23 PM   #1
amitkush
Member
 
Registered: Jun 2003
Location: Roorkee, Uttrakhand, India
Distribution: RedHat, Ubuntu
Posts: 47

Rep: Reputation: 15
Unhappy Problem with symbolic link on using Windows 2008 share in RedHat


Hi everybody!

I have a mail server running on Redhat and an another machine with Windows 2008 Server.

Lately I tried backing up my mail server data on the Windows share by mounting the shared folder as cifs system.

I tried cp as well as rsync, all goes well but the symbolic links could not be copied and "symbolic links not supported" message is flashed. Finally, the transfer fails with so many errors.

Any suggestions about how to go for it?

Thanks
 
Old 12-19-2013, 12:02 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195
The Windows filesystem will not support symbolic links, hence the message, "symbolic links not supported".
 
1 members found this post helpful.
Old 12-19-2013, 12:10 AM   #3
amitkush
Member
 
Registered: Jun 2003
Location: Roorkee, Uttrakhand, India
Distribution: RedHat, Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Ya...I googled a lot and could find the same thing. Just to be sure, is there any other way by which I could take a proper backup of the folder on the share.

Thanks
 
Old 12-19-2013, 12:20 AM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195
Quote:
Originally Posted by amitkush View Post
Ya...I googled a lot and could find the same thing. Just to be sure, is there any other way by which I could take a proper backup of the folder on the share.

Thanks
Not a "proper" backup - i.e., one that could be used to restore the original. Symlinks are not the only problem for a proper backup, I am sure that ownerships and permission would also come into play for a mail server.

With rsync you could use the --copy-links option to save the link targets instead of the links themselves, but that might be a bad idea both from a security and storage size perspective. For example, symlinks that pointed to password or other configs would be copied, and directories referred from multiple locations would be copied to each of those locations in the backup.

Probably the best option would be to create a tar archive as the backup, which could include symbolic links, then copy that to the Windows machine.

Last edited by astrogeek; 12-19-2013 at 12:24 AM. Reason: Failing memory, incomplete thoughts...
 
Old 12-19-2013, 12:31 AM   #5
amitkush
Member
 
Registered: Jun 2003
Location: Roorkee, Uttrakhand, India
Distribution: RedHat, Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by astrogeek View Post
Not a "proper" backup - i.e., one that could be used to restore the original. Symlinks are not the only problem for a proper backup, I am sure that ownerships and permission would also come into play for a mail server.

With rsync you could use the --copy-links option to save the link targets instead of the links themselves, but that might be a bad idea both from a security and storage size perspective. For example, symlinks that pointed to password or other configs would be copied, and directories referred from multiple locations would be copied to each of those locations in the backup.

Probably the best option would be to create a tar archive as the backup, which could include symbolic links, then copy that to the Windows machine.
While using cp, I used -p to preserve the permissions of the files.

In one of the threads in the forum, I read about using NFS for mounting 2k8 filesystem in CentOS. Do we have the same "symbolic link" problem in NFS also? As far as I know, NFS is used for sharing in non-window environment.
 
Old 12-19-2013, 12:40 AM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195
NFS is used for mounting Unix/Linux filesystems across a network. I am not aware whether Windows would support that as either a client or server.

But the problem is not in how the shared directory is mounted, it is the problem that the underlying filesystem itself does not support symlinks, ownerships and permissions.

So whether you mount it via NFS, CIFS, Samba, etc... the Windows filesystem simply is not capable of storing the symlinks and other file attributes.

Using cp -p may not have complained, but I am sure the ownerships and permissions were not stored on the Windows machine. You may want to check that so that you do not assume that you have more information stored than you really do.

As far as I know the only way to backup a Linux filesystem to a Windows filesystem then restore it with symlinks and other attributes intact would be to first archive it (i.e. tar) then save the archive to the Windows machine.

Hope that helps.
 
1 members found this post helpful.
Old 12-19-2013, 12:50 AM   #7
amitkush
Member
 
Registered: Jun 2003
Location: Roorkee, Uttrakhand, India
Distribution: RedHat, Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by astrogeek View Post
NFS is used for mounting Unix/Linux filesystems across a network. I am not aware whether Windows would support that as either a client or server.

But the problem is not in how the shared directory is mounted, it is the problem that the underlying filesystem itself does not support symlinks, ownerships and permissions.

So whether you mount it via NFS, CIFS, Samba, etc... the Windows filesystem simply is not capable of storing the symlinks and other file attributes.

Using cp -p may not have complained, but I am sure the ownerships and permissions were not stored on the Windows machine. You may want to check that so that you do not assume that you have more information stored than you really do.

As far as I know the only way to backup a Linux filesystem to a Windows filesystem then restore it with symlinks and other attributes intact would be to first archive it (i.e. tar) then save the archive to the Windows machine.

Hope that helps.
Thanks astrogeek. Will try to backup by archiving as suggested by you. Many thanks!
 
Old 12-19-2013, 12:53 AM   #8
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195Reputation: 4195
You are welcome!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic link to samba share ? verus001 Linux - Newbie 4 09-01-2011 05:49 PM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
Symbolic link to Windows mshome path john0000 Linux - Networking 9 12-14-2006 04:36 PM
Does windows XP have something like symbolic link? hkl8324 General 4 06-27-2005 10:08 PM
Redhat 8.0 Symbolic Link Problem & Maillog Problem. borisys Red Hat 1 07-27-2004 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration