Home server question. Ubuntu Hardy. XP Pro.

Status
Not open for further replies.

Jayce

Fully Optimized
Messages
3,056
Location
/home/jason
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?
 
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.
 
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?
 
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?
 
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?
 
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 - 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
 
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
 
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.
 
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.
 
Status
Not open for further replies.
Back
Top Bottom