Two way sync with rsync

后端 未结 10 1687
别那么骄傲
别那么骄傲 2021-01-29 18:50

I have a folder a/ and a remote folder A/. I now run something like this on a Makefile:

get-music:
 rsync -avzru server:/media/10001/music/ /media/Incoming/music         


        
相关标签:
10条回答
  • 2021-01-29 19:18

    Rclone is what you are looking for. Rclone ("rsync for cloud storage") is a command line program to sync files and directories to and from different cloud storage providers including local filesystems. Rclone was previously known as Swiftsync and has been available since 2013.

    0 讨论(0)
  • 2021-01-29 19:19

    You can use cloudsync to keep a folder in-sync with a remote:

    pip install cloudsync
    pip install cloudsync-gdrive
    cloudsync sync file:c:/users/me/documents gdrive:/mydocs
    

    If the remote is NFS, you can use:

    cloudsync sync file:c:/users/me/documents/ file:/mnt/nfs/whatevs
    
    0 讨论(0)
  • 2021-01-29 19:24

    You might use Osync: http://www.netpower.fr/osync , which is rsync based with intelligent deletion propagation. it has also multiple options like resuming a halted execution, soft deletion, and time control.

    0 讨论(0)
  • 2021-01-29 19:26

    Since the original question also involves a desktop and laptop and example involving music files (hence he's probably using a GUI), I'd also mention one of the best bi-directional, multi-platform, free and open source programs to date: FreeFileSync.

    It's GUI based, very fast and intuitive, comes with filtering and many other options, including the ability to remote connect, to view and interactively manage "collisions" (in example, files with similar timestamps) and to switch between bidirectional transfer, mirroring and so on.

    0 讨论(0)
  • 2021-01-29 19:26

    Try this,

    get-music:
     rsync -avzru --delete-excluded server:/media/10001/music/ /media/Incoming/music/
    
    put-music:
     rsync -avzru --delete-excluded /media/Incoming/music/ server:/media/10001/music/
    
    sync-music: get-music put-music
    

    I just test this and it worked for me. I'm doing a 2-way sync between Windows7 (using cygwin with the rsync package installed) and FreeNAS fileserver (FreeNAS runs on FreeBSD with rsync package pre-installed).

    0 讨论(0)
  • 2021-01-29 19:26

    I'm now using SparkleShare https://www.sparkleshare.org/

    works on mac, linux and windows.

    0 讨论(0)
提交回复
热议问题