[SOLVED] Problem with symbolic link on using Windows 2008 share in RedHat
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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...
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.
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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.