• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

一款快速,跨平台,多向的文件实时同步工具:Mutagen

主机教程 Liam 1年前 (2019-07-27) 665次浏览 21个评论 扫描二维码
文章目录[隐藏]

说明:Mutagen是一个开源、跨平台的文件同步和网络转发工具,目前支持本地文件系统,远程服务器和Docker容器文件系统之间的同步,感觉同步和lsyncd很类似,但安装和配置更简单。同时也支持转发本地TCP端口(IPv4IPv6)和Unix域套接字,并可以将本地Unix域套接字映射到远程TCP侦听器。

安装

Github地址:https://github.com/mutagen-io/mutagen

支持系统:WindowsMacOSLinux

先访问下载地址→传送门,根据自己的系统架构选择对应的最新版二进制文件,这里以常见的Linux VPS为例,32位就选38664就选amd64,具体还是以实际情况为准,目前最新版为v0.10.0-beta2,如果版本有更新,记得替换下面的下载链接即可。

安装命令:

#32位系统下载二进制文件 wget https://github.com/mutagen-io/mutagen/releases/download/v0.10.0-beta2/mutagen_linux_386_v0.10.0-beta2.tar.gz #64位系统下载二进制文件 wget https://github.com/mutagen-io/mutagen/releases/download/v0.10.0-beta2/mutagen_linux_amd64_v0.10.0-beta2.tar.gz  #解压文件 tar zxvf mutagen_linux_*.tar.gz -C /usr/local/bin #启动 mutagen daemon start 

使用命令:

#后期随着更新,命令参数可能会有变化,到时候使用mutagen -h查看最新参数即可 Usage:   mutagen [flags]   mutagen [command]  Available Commands:   sync        Create and manage synchronization sessions   forward     Create and manage forwarding sessions [Experimental]   project     Orchestrate sessions for a project [Experimental]   daemon      Control the lifecycle of the Mutagen daemon   version     Show version information   legal       Show legal information   help        Help about any command  Flags:   -h, --help   Show help information  Use "mutagen [command] --help" for more information about a command. 

使用方法

这里主要说同步功能,转发的话,貌似大多数人用不到,如果想了解转发可以查看→传送门

首先同步前,需要先创建一个同步会话,默认为双向同步,命令示例:

#创建一个名为rats1的同步本地/moerat和远程服务器/rats文件夹的会话 mutagen sync create --name=rats1 /moerats [email protected]远程服务器ip:port:/rats  比如远程服务器ip为1.2.3.4,端口为9999,用户名root,则[email protected]远程服务器ip:port可以写成为[email protected]:9999 

创建期间可能会要你多次输入远程服务器的密码,创建会话后,本地文件夹和远程文件夹可以双向同步了,意味着本地和远程的文件夹有任何一个文件夹出现变动,均会在另一方出现变动。

如果要单向同步,则命令示例:

#创建一个名为rats1的同步本地/moerat和远程服务器/rats文件夹的会话 mutagen sync create --name=rats1 -m one-way-safe /moerats [email protected]远程服务器ip:port:/rats 

创建会话后,只会单向同步本地/moerat文件夹到远程服务器/rats文件夹,意味着/moerat文件夹出现变动会影响/rats文件夹,而/rats文件夹出现变动不会影响/moerat文件夹。

除了远程同步外,还可以实现本地服务器文件夹之间双向同步,也可以和Docker容器里面的文件夹同步,命令示例:

#创建一个名为rats1的同步本地/moerat和本地/rats文件夹的会话 mutagen sync create --name=rats1 /moerats /rats  #创建一个名为rats1的同步本地/moerat和本地服务器指定Docker容器内/rats文件夹的会话 mutagen sync create --name=rats1 /moerats docker://[email protected]容器ID/rats

Docker容器ID可以使用docker ps命令查看,CONTAINER ID为容器ID,创建本地会话后,相应的文件会双向同步。

其它命令:

#查看所有的会话 mutagen sync list #监控名为rats1的会话 mutagen sync monitor rats1 #停止名为rats1的会话 mutagen sync pause rats1 #恢复名为rats1的会话 mutagen sync resume rats1 #刷新名为rats1的会话 mutagen sync flush rats1 #永久删除名为rats1的会话 mutagen sync terminate rats1

最后该软件要是用来备份的话,貌似有点单一,想要功能比较多的可以看看ResticDuplicati,或者需要和OneDrive之间实时同步的话可以查看→传送门


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:一款快速,跨平台,多向的文件实时同步工具:Mutagen
喜欢 (2)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(21)个小伙伴在吐槽
  1. Greetings! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us beneficial information to work on. You have done a wonderful job!
    black mass2020-08-31 06:24 回复 Linux | Firefox浏览器 59.0
  2. No matter if some one searches for his vital thing, so he/she desires to be available that in detail, thus that thing is maintained over here.
    cheap flights2020-08-28 05:40 回复 Windows 7 | 360浏览器 SE
  3. My partner and I absolutely love your blog and find a lot of your post's to be just what I'm looking for. Would you offer guest writers to write content available for you? I wouldn't mind writing a post or elaborating on a few of the subjects you write about here. Again, awesome web site!
    cheap flights2020-08-26 13:54 回复 Linux | Firefox浏览器 52.9
  4. This design is incredible! You certainly know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Fantastic job. I really loved what you had to say, and more than that, how you presented it. Too cool! 2CSYEon cheap flights
    cheap flights2020-08-25 19:22 回复 Linux | Firefox浏览器 61.0
  5. I am sure this paragraph has touched all the internet visitors, its really really nice piece of writing on building up new weblog. cheap flights 3aN8IMa
    cheap flights2020-08-25 08:53 回复 Mac OS X | Chrome 63.0.3239.84
  6. Good article. I am going through some of these issues as well.. 31muvXS cheap flights
    cheap flights2020-08-25 05:44 回复 Linux | Firefox浏览器 60.0.1
  7. whoah this blog is wonderful i love studying your posts. Keep up the good work! You realize, many individuals are hunting around for this info, you can help them greatly. cheap flights 34pIoq5
    cheap flights2020-08-25 00:34 回复 Mac OS X | Chrome 63.0.3239.132
  8. Great website. Lots of useful info here. I am sending it to several pals ans also sharing in delicious. And naturally, thanks to your sweat!
    content hosting2020-08-14 16:26 回复 Linux | Chrome 66.0.3359.139
  9. Remarkable issues here. I am very glad to see your article. Thanks so much and I'm looking ahead to touch you. Will you please drop me a e-mail?
    best web hosting 20202020-08-11 08:09 回复 Mac OS X | Chrome 67.0.3396.79
  10. I was suggested this web site by my cousin. I'm not sure whether this post is written by him as nobody else know such detailed about my trouble. You're incredible! Thanks!
    webhosting2020-08-10 11:15 回复 Mac OS X | Firefox浏览器 62.0
  11. You made some really good points there. I checked on the net for additional information about the issue and found most people will go along with your views on this site.
    best web hosting sites2020-08-05 21:43 回复 Linux | Chrome 67.0.3394.0
  12. Thanks in favor of sharing such a good opinion, piece of writing is fastidious, thats why i have read it fully
    cheap flights with jet2 com2020-07-31 12:45 回复 Linux | Chrome 67.0.3396.79
  13. You could certainly see your expertise within the work you write. The arena hopes for more passionate writers such as you who aren't afraid to mention how they believe. At all times follow your heart. adreamoftrains website hosting companies
    adreamoftrains website hosting companies2020-07-30 19:25 回复 Linux | 未知浏览器
  14. That is a great tip especially to those fresh to the blogosphere. Brief but very precise info… Thank you for sharing this one. A must read article!
    web hosting reviews2020-07-27 06:29 回复 Linux | Chrome 67.0.3396.62
  15. It's enormous that you are getting ideas from this paragraph as well as from our dialogue made here.
    web hosting services2020-07-26 07:14 回复 Linux | Chrome 63.0.3239.132
  16. Hi mates, its fantastic article regarding cultureand fully defined, keep it up all the time.
    web hosting reviews2020-07-22 08:32 回复 Linux | Firefox浏览器 52.9
  17. Hey there! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done a outstanding job!
    best web hosting sites2020-07-16 20:13 回复 Linux | Chrome 68.0.3398.0
  18. I am really thankful to the owner of this web site who has shared this impressive article at here.
    cbd oil that works 20202020-06-29 11:47 回复 Windows 8.1 | Chrome 66.0.3359.117
  19. Definitely believe that which you stated. Your favorite reason appeared to be on the internet the simplest thing to be aware of. I say to you, I certainly get annoyed while people think about worries that they just do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will probably be back to get more. Thanks
    cbd oil that works 20202020-06-28 06:12 回复 Linux | Chrome 51.0.2705.45
  20. Thanks for finally writing about > 一款快速,跨平台,多向的文件实时同步工具:Mutagen db1024 db1024 < Liked it!
    tinyurl.com2020-06-27 14:06 回复 Windows 8.1 | Chrome 65.0.3325.181
  21. I am really grateful to the holder of this web page who has shared this enormous piece of writing at at this time.
    g rsacwgxy2020-06-23 05:03 回复 Windows 8.1 | Firefox浏览器 60.0