Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to back up my data preserving hard link to a network drive connected through cifs. Is it possible?

My system is Linux (EXT4) and I have two network drives: one is also Linux (EXT4) and the other is Windows. Both are mounted through cifs.

I tried rsync -avzpH but it seemed to work only within a file system. I don't know if I missed an option or it is not possible.

share|improve this question
    
Hardlinks themselves can't span filesystems, since a file and a hardlink to it share the same inode. If you have a hardlink within a filesystem, the -H option will make rsync copy it. However, your link is probably a symbolic link, which is copied if you use the -l or -a (which implies -l) switch. You are using the -a switch, so it should copy your symlinks. tldr: What you're doing should work. –  Dr Kitty Mar 28 '12 at 22:43
    
So unlike symbolic links, hardlinks can not be preserved in my backup through rsync if I save it on another drive even though both of the file systems formatted in same format? Did I understand correctly? –  microbe Mar 29 '12 at 14:37

1 Answer 1

"and the other is Windows"

The file system on the destination drive also needs to support hardlinks ... only available (by default at least) in vista and later (2k and xp support a similar link type known as junction points, but it doesn't really translate) As long as the file system support is met and rsync is >= 2.5.6, the -H option should take care of hard links (so long as cifs isn't doing something wonky - it can be precarious at times).

share|improve this answer
    
It's Windows server 2008. I prefer the hard drive mounted on the Windows because it is bigger but if the file system has a problem to support hardlink, I can use the hard drive mounted on a Linux system formatted EXT4. I'm still not sure if I can preserve hardlinks as I tried -H option. –  microbe Mar 29 '12 at 14:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.