Results 1 to 4 of 4

Thread: Rsync options

  1. #1
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Rsync options

    Hi,

    I am looking for the correct use of Rsync options.

    Here is my case:
    I want to sync 2 folders, one on a desktop and the other on my server. My objective is to keep the desktop folder always updated with the content of the server folder.

    If I get this working, I can do the same with the rest of my desktop and laptop users. When online they can run a script with rsync and update data.

    Is it possible to get 2 way sync?
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,760
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Rsync options

    Did you solve your problem?

    Using rsync over ssh would be the easiest way to do that. To get the lastest changes from the server:
    Code:
    $ rsync -av -e ssh server:/path/to/dir/ /local/path/
    And this to push your changes to the server:
    Code:
    $ rsync -av -e ssh /local/path/ server:/path/to/dir/
    Hope it helps.

  3. #3
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,013
    Distro
    Kubuntu Development Release

    Re: Rsync options

    If you want to make them exact copies, you'll probably want to use the --delete option as well. I actually prefer not deleting files on the target to maintain an archive, but then I'm interesting in backing up one machine to another, not keeping them in sync.

  4. #4
    Join Date
    Oct 2007
    Location
    Norway
    Beans
    190
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Rsync options

    This solved my case. I use -delete because I need to have it synced, not backup.
    http://halvorsen.ddns.net/ Linux Registered User #518648
    Ubuntu 14.04 LTS Server
    Always have your stuff when you need it with @Dropbox. 2GB account is free! http://db.tt/2aZta6Z

Tags for this Thread

Bookmarks

Posting Permissions

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