设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 155|回复: 0

Fast file synchronization between linux and windows box

[复制链接]
发表于 2014-3-15 00:31:52 | 显示全部楼层 |阅读模式
Many times, when I work on various projects, I need to synchronize filesbetween my windows box and linux server.
WinSCP has the nice synchronize feature, but it's very slow andinaccurate in some cases.
My first thought was to install cygwin and use rsync, but it gets easierthan than. All you need is DeltaCopy program on windows side and SSHserver on linux side (you probably already have that).
Here are the steps I used to get it working:
First, we'll create the public & private key pair for password-lesslogin. You can skip this part if you already have keys you would like touse.
On windows, you can use PuttyGen for that.
Generate the key, click on Conversions / Export OpenSSH key and save thekey somewhere on disk.
[][]
Copy public key and paste it into .ssh/authorized_keys file for aremote user which will be used for synchronization.
Download DeltaCopy and extract it somewhere.
Run DeltaC.exe
Click 'Create new profile' and enter remote server data.  Remove 'Assignto scheduler' checkbox if you don't wan't periodic auto synchronization.Click 'Add profile'.
Under 'File list' tab, add folders/files you would like to synchronize.Right-click folder and select 'Modify target path' to change target. Ifyou want to synchronize single directory, set empty target path.
Under 'Options' tab select 'Connect via SSH'.  Enter something like thisinto 'Additional parameters' field:
-e 'ssh -p SSH_PORT -l REMOTE_USER -i PRIVATE_KEY_FILENAME' --chmod=u=rwx,g=rwx,o=rx --exclude=".svn/" --exclude="logs/" --exclude="cache/"
Change SSH_PORT, PRIVATE_KEY_FILENAME and REMOTE_USER with yourvalues. Copy private key to DeltaCopy directory or set full path here.Chmod switch is needed, because otherwise, all new files will be createdusing mask 000. You can specify folders/files to exclude with --excludeswitch.
[][]
That's it! When you want to synchronize folders, right-click profile andselect 'Run Now'.
[]:

  []:


您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )  

GMT-8, 2025-8-26 09:18 , Processed in 0.016342 second(s), 16 queries .

Supported by Best Deal Online X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表