Find the answer to your Linux question:
Results 1 to 6 of 6
Hi All, What is the easiest method for me to set up a rsync between my computer and my wife's computer? When I have the -a option it spits out ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,998

    rsync + samba


    Hi All,

    What is the easiest method for me to set up a rsync between my computer and my wife's computer? When I have the -a option it spits out permission errors. I mount her computer to mine on boot with samba, just trying to easily sync everything up (has to be recursive). Appreciate the help in advance
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  2. #2
    Just Joined! RobKendrick's Avatar
    Join Date
    Oct 2008
    Location
    Georgia, USA
    Posts
    15
    Hi J,

    Are you mounting her computer with samba because it's a Windows machine? If so, do you have Cygwin + OpenSSH installed, or WinSSHd?

  3. #3
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,998
    It does have Windows but....she runs Linux 99% of the time so I'm open to other solutions

    As to the other question...honestly not sure, I don't do much with networking

    Lastly, I had a question

    It seems a bit unsafe to me that you put username/password in fstab in order to mount a samba share....is this safe? Could you hypothetically easily get to this with a live boot on the machine, just copy paste the file to a thumb drive and bingo, you have user info?
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  4. #4
    Just Joined! RobKendrick's Avatar
    Join Date
    Oct 2008
    Location
    Georgia, USA
    Posts
    15
    I sync my wife's Windows computer with my Crunchbang Linux machine using Cygwin. As for different Linux systems, I believe you just have to have the same user account on both sides; I've never had permissions issues syncing between my laptop, desktop at home, and desktop at work; I use the same username for each one.

    As for samba, I prefer to not auto-mount on bootup. Instead, I drop a simple bash script into my bin directory:

    Code:
    #!/bin/bash
    #
    
    if [ ! -d "/home/rob/net/wifey" ]
        mkdir /home/rob/net/wifey
    fi
    
    if [ ! -d "/home/rob/net/wifey/cygdrive/c" ]
        sudo smbmount //wifeymachine/c\$ /home/rob/net/wifey/
    else
        echo "It's already mounted, doofus."
    fi
    This way, I only mount it if I need to, and I enter the password when prompted; prevents unauthorized access and prevents passwords from being left around. If you don't want to do that, then you have other options, such as storing your password in a file only root has access to and then referencing that file in fstab, or even on a flash drive you plug in each time and then reference the UUID (though I don't know specifically how to do that last one yet).

    I hope this helps!

  5. #5
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,998
    Helps a ton. I'm going to actually try using openssh server and see how that goes. The issue is that I want two users but I know this complicates things....I mainly want two users to keep bookmarks and other stuff separate, maybe it's time to just start using a single user and having a server backup that then syncs with each computer....ah, the complications of networking stuff

    Many thanks
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  6. #6
    Just Joined! RobKendrick's Avatar
    Join Date
    Oct 2008
    Location
    Georgia, USA
    Posts
    15
    It doesn't really overcomplicate things...you just include the username with your rsync in the ssh command string. And if you don't want to have to worry about entering a password to sync, then do the following for each user:
    Code:
    ssh-keygen -t rsa
    ...and add the public key to the ~/.ssh/authorized_keys file of the host system for that user.

    Best of luck!
    Rob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •