View previous topic :: View next topic |
Author |
Message |
fincoop Tux's lil' helper
Joined: 02 Feb 2004 Posts: 147
|
Posted: Fri Jul 01, 2011 2:19 pm Post subject: Preserving symbolic links through Samba |
|
|
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 |
|
|
nyda Apprentice
Joined: 12 Aug 2004 Posts: 183
|
Posted: Sat Jul 02, 2011 8:59 am Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23082
|
Posted: Sat Jul 02, 2011 4:07 pm Post subject: |
|
|
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 |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sat Jul 02, 2011 5:46 pm Post subject: |
|
|
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 |
|
|
|