Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Preserving symbolic links through Samba
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
fincoop
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2004
Posts: 147

PostPosted: Fri Jul 01, 2011 2:19 pm    Post subject: Preserving symbolic links through Samba Reply with quote

Really,

I am looking for an elegant way to back up symbolic links on Gentoo on my Windows machine, where the backup drive is attached. I think, because these attributes are not exported through Samba / Windows wouldn't understand them that this is going to be hard. But, I thought at least that I would ask the pros if there is a way to copy links from Gentoo to Windows and not drag over duplicate copies of the original file.

Alternatively I have tried using tar to capture the directories with the links in them, and then copy the tarball over, and that seems to work, but a bit of a hassle.

TIA
Back to top
View user's profile Send private message
nyda
Apprentice
Apprentice


Joined: 12 Aug 2004
Posts: 183

PostPosted: Sat Jul 02, 2011 8:59 am    Post subject: Reply with quote

I think the tar solution is pretty much the way to go. You could automate it a bit though.

Set up SSH with public key access on your Gentoo box and configure a new user (i.e. "autobackup"). Set the login shell for that user to be a bash script that does the tar-stuff and moves the file to a place you can access via Samba. Install Putty on your windows box and create a key and a profile "autobackup" for autobackup@yourserver. Then add a link to your startmenu/quicklaunch/desktop that launches Putty with the parameters -load "autobackup" to directly log into your Linux Box and start the backup process. Once it's done, just download the file via Samba.

Or... wait for someone with a better idea :-)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Sat Jul 02, 2011 4:07 pm    Post subject: Reply with quote

If you insist on letting Windows manage the backup drive, then you will have a messy solution, since there is no convenient way to express certain Linux filesystem concepts in NTFS.

I like nyda's idea, but there is no need to create a dedicated user with a special shell for it. Instead, set the command via the authorized_keys line that authorizes the Windows system to connect. Also, you might find it useful to use plink instead of putty. The former is more console-oriented and should be easier to script, once you get a decent scripting language interpreter installed on Windows.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Sat Jul 02, 2011 5:46 pm    Post subject: Reply with quote

Windows 7 claims to be "compatible" with symbolic links of linux. But that "compatibility" is only half-baked. symbolic links in linux are not interpreted as such in windows. But symbolic links created in win7 are recognized as such in linux (only via ntfs-3g). So, tar is definitely the best option.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum