Computer ForumsComputers  

Go Back   Computer Forums > PC Technology Zone > Linux, BSD, other *nixes & Open Source Software

Reply
 
LinkBack Thread Tools Display Modes
Old 08-02-2008, 04:31 AM   #1 (permalink)
Monster Techie
 
Join Date: Sep 2005
Posts: 1,077
Send a message via AIM to Jayce
Default Home server question. Ubuntu Hardy. XP Pro.

My computer = Ubuntu Hardy Heron + Win XP Pro.
Everybody else's computer in the house = XP Pro.

Question...

At work, we have a synchronize setup to which the user's my documents folder will be synchronized to their targeted share folder on the server. That means if they make any changes to my documents folder, it'll synchronize to the server in a relatively short time (normally immediately) and always does a full blown re-sync when they log on/off.

I'm curious to know if there's a solution to that but with using Ubuntu Hardy as a "server." Currently, my family has the ability of doing a start-run-192.168.my.ip and logging in to their share from a samba setup I have. But that requires them to copy + paste everything and constantly overwrite existing files to transfer even the newest stuff over. It works, and in fact it works great, but I'm curious to know if there's something more efficient.

If I could somehow just link their my documents to synchronize to a certain folder on my samba drive, that would enable me to have a backup of their files so if they get yet another blue screen (it's been a common occurence) then, we're covered with the most recent backups.

Any suggestions?
Jayce is online now   Reply With Quote
Old 08-02-2008, 06:11 AM   #2 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Home server question. Ubuntu Hardy. XP Pro.

I'm not really sure how to do this from the Windows computers, but you could always have them share their My Documents folders and have the Ubuntu server run a script to sync them. There's probably a better way.
__________________
Greg is offline   Reply With Quote
Old 08-02-2008, 12:17 PM   #3 (permalink)
Monster Techie
 
Join Date: Sep 2005
Posts: 1,077
Send a message via AIM to Jayce
Default Re: Home server question. Ubuntu Hardy. XP Pro.

Can you give me an example of what the script would look like?

I use rsync to copy my home dir to another hard drive, just to have music and pictures and whatnot backed up. So I'm pretty familiar with local rsync from 1 directory to another... but over the network, how is that done?
Jayce is online now   Reply With Quote
Old 08-02-2008, 05:32 PM   #4 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Home server question. Ubuntu Hardy. XP Pro.

You can add an entry to your fstab which will automatically mount the shares to a local directory. Or write a script to do it. Then you can just use your rsync or whatever else you want to get the job done.

I'm not actually familiar with rsync, but after a quick search it looks like this would be a much better alternative to one of my hacked together scripts. Looks like rsync is meant to be used across a network, no?
__________________
Greg is offline   Reply With Quote
Old 08-03-2008, 03:16 AM   #5 (permalink)
Monster Techie
 
Join Date: Sep 2005
Posts: 1,077
Send a message via AIM to Jayce
Default Re: Home server question. Ubuntu Hardy. XP Pro.

I only use rsync for copying my home directory to a spare hard drive in my computer, so that way I have my files infact if my main drive goes down.

It's pretty easy... my script is a bit different since I have 2 hard drives, but in essence it's this.


Sudo rsync ~/ media/backup

bam, simple. I've just never used it across a network. I don't know how the command would look like. Do I use IPs? Do I use computer names? How do I do that?

sudo rsync /brotherscomputer /media/backup? Or what?
Jayce is online now   Reply With Quote
Old 08-03-2008, 02:44 PM   #6 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Home server question. Ubuntu Hardy. XP Pro.

First make the folder where you want to mount the share. For example
Code:
mkdir ~/mnt
Then you should just be able to go
Code:
sudo mount //192.168.0.7/files /home/user/mnt
Then you can do your
Code:
sudo rsync /home/user/mnt /media/backup
or whatever else you want
__________________
Greg is offline   Reply With Quote
Old 08-04-2008, 09:48 AM   #7 (permalink)
Monster Techie
 
Join Date: Sep 2005
Posts: 1,077
Send a message via AIM to Jayce
Default Re: Home server question. Ubuntu Hardy. XP Pro.

Greg - thanks. Just thinking out loud here...

Backup shares are mounted in /media/backup/username...

so if Curt = 192.168.1.102...

sudo rsync //192.168.1.102/"My Documents" /media/backup/curt

hmmmm
Jayce is online now   Reply With Quote
Old 08-04-2008, 05:47 PM   #8 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Home server question. Ubuntu Hardy. XP Pro.

okay, or if that doesn't work then try something like this:
Code:
sudo mount //192.168.1.102/My\ Documents/ /mnt/curt
sudo rsync /mnt/curt /media/backup/curt
if you do this you will need to "mkdir /mnt/curt" first, or whatever you want to call it/wherever want to put it
__________________
Greg is offline   Reply With Quote
Old 08-06-2008, 08:07 AM   #9 (permalink)
Monster Techie
 
Join Date: Sep 2005
Posts: 1,077
Send a message via AIM to Jayce
Default Re: Home server question. Ubuntu Hardy. XP Pro.

This is what I found.

I got errors going by hostname. Whatever, no biggie... so I used IPs instead.

New question... when I run the command, it prompts me for a password. I found the switch to put in the command to auto-input the password. Problem is, this is a security vulnerability when it comes to somebody seeing my script.

See?

Code:
#!/bin/bash
sudo mount -t smbfs //192.168.1.101/"My Documents" /media/networkfolder -o pass=mypassword
sudo rsync -a --progress --delete /media/networkfolder /media/backup/jason
sudo umount /media/networkfolder
Is there anyway I can bypass the windows password option, or somehow incorporate some type of encrypted style passthru?

Note - If I put just any garbage in the password box, it still mounts. I have no idea why. I suppose I could put in the password section just "xxxxxx" but that doesn't "fix" the problem. I'd like to know what the reasoning is behind that.

Last edited by Mak213; 08-06-2008 at 01:04 PM. Reason: added code tags
Jayce is online now   Reply With Quote
Old 08-06-2008, 11:09 PM   #10 (permalink)
Indeed.
 
Greg's Avatar
 
Join Date: Dec 2004
Posts: 1,531
Default Re: Home server question. Ubuntu Hardy. XP Pro.

Hmm, that's odd, I dunno. Maybe it needs the password switch to run while your SMB share doesn't actually require one. I'm not sure. Try leaving it blank, or just put like "" or $NULL or something.

Sorry I can't be more help. I only ever use SMB to stream media to my Xbox.
__________________
Greg is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tech-Forums Community Driven Spyware/Virus Removal Program Osiris Virus - Spyware Protection / Detection 26 06-10-2008 12:55 PM
Bonds slugs No. 756 to pass Aaron as home run king Osiris Off Topic Discussion 20 08-14-2007 03:56 PM
Simple/stupid server question aubn8r32 Windows Operating Systems and Software 1 05-26-2007 05:15 PM
CoD2 server question super_neil PC Gaming 1 05-16-2007 05:11 PM


All times are GMT -5. The time now is 11:02 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0