gpt4 book ai didi

vagrant - 双向 Vagrant Rsync

转载 作者:行者123 更新时间:2023-12-04 01:44:23 25 4
gpt4 key购买 nike

我已将 Vagrant 配置为使用 Rsync 共享文件夹而不是(非常慢)vboxsf VirtualBox 默认提供的文件系统:

Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__args: ["--verbose", "--archive", "-z"]
end

显然,还有更多的配置,但我找到了这些说明 here它们通常用于从主机到 guest 的同步。

但是,我需要 guest 能够同步回主机,因为我的一些构建工具仅安装在 guest 上。如何在共享文件夹中双向同步?

最佳答案

不幸的是没有,
引自 documentation :

The rsync synced folder does a one-time one-way sync from the machine running to the machine being started by Vagrant.



更适合您使用 NFS (或 SMB 如果使用 Windows 主机)

In some cases the default shared folder implementations (such as VirtualBox shared folders) have high performance penalties. If you're seeing less than ideal performance with synced folders,

关于vagrant - 双向 Vagrant Rsync,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26873316/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com