Rsync - Keep two folders in sync?

  • I've got two OMV servers running, and I want to be able to make changes & delete files on both servers but keep the files in sync
    Is this possible with Rsync?
    I'm using it to copy filesfrom server (a) to server (b), but i would like to be able to add files to (b) which is subsequently copied to (a). Also be able to delete files from either and the deletion is reflected on the other server

  • How would you do this using BTSync? I installed the plug and setup a shared folder - but its not clear how you setup both OMV servers to sync the same folder. Help would be appreciated.

  • If you've set up a shared folder on one server, copy the full access secret and create a shared folder on the other server, but when you create it use the secret you just copied and paste it in the existing secret field :)

  • Zitat von "subzeroin"

    If you've set up a shared folder on one server, copy the full access secret and create a shared folder on the other server, but when you create it use the secret you just copied and paste it in the existing secret field :)


    Ok did that but didnt work, so maybe need to set fixed ports and then port forward on the routers. Cheers

  • So I fixed the ports on both BTSync severs (22222) and ensured the routers port forwarded this traffic to the respective servers, but nothing syncing.
    Any thoughts?

  • Zitat von "johnyb"

    but nothing syncing. Any thoughts?


    You have to set read/write-permissions for btsync-user and btsync-group on both shared folders via the ACL.

  • did you try to check the "Delete files on the receiving side that don't exist on sender"-option when creating a rsync-job?


    Only use that option if you are REALLY sure that you want to use it. If you select it you may delete a file forever in the backup location which was just accidentially deleted in the source location.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • theres a little flag for the fearsome:


    --dry-run


    With this rsync does everything, without writing or changing files. Good because the rsync syntax can be sometimes tricky (i mess up the trailing / from time to time) ;)


    EDIT: or -n

    Tom


    ----


    HP N54L, 6GB, 5disc Raid5, SSD Boot with OMV 5
    HP N54L, 16GB, 4disc ZFS pool, SSD Boot with other NAS system

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!