ÔõÑùÔÚLinuxÉÏÉèÖÃÊý¾Ýͬ²½
ÔõÑùÔÚlinuxÉÏÉèÖÃÊý¾Ýͬ²½
ÔÚÏÖ´úµÄÐÅϢʱ´ú£¬Êý¾Ýͬ²½ÊÇÒ»ÏîÖ÷ÒªµÄʹÃü¡£ÎÞÂÛÊÇСÎÒ˽ÈËÓû§ÕÕ¾ÉÆóÒµ»ú¹¹£¬¶¼ÐèҪȷ±£Êý¾ÝÔÚ¶à¸ö×°±¸Ö®¼äµÄͬ²½ºÍ±¸·Ý¡£¶øÔÚLinuxϵͳÖУ¬ÉèÖÃÊý¾Ýͬ²½¿ÉÒÔ½ÓÄɶàÖÖ·½·¨£¬±¾ÎĽ«ÏÈÈÝһЩ³£¼ûµÄÒªÁ죬²¢ÌṩÏìÓ¦µÄ´úÂëʾÀý¡£
rsyncÏÂÁî
rsyncÊÇÒ»ÖÖÇ¿Ê¢µÄÊý¾Ýͬ²½¹¤¾ß£¬¿ÉÒÔÔÚÍâµØ»òÔ¶³ÌÖ®¼ä¾ÙÐÐÎļþºÍĿ¼µÄͬ²½¡£ÏÂÃæÊÇʹÓÃrsyncÏÂÁîʵÏÖÊý¾Ýͬ²½µÄʾÀý´úÂ룺
rsync -avz --delete /source/path/ user@remote:/destination/path/
µÇ¼ºó¸´ÖÆ
ÉÏÊöÏÂÁîÖУ¬-a²ÎÊýÌåÏÖʹÓù鵵ģʽ£¬¼á³ÖÎļþÊôÐÔ¡¢È¨ÏÞºÍÁ´½Ó£¬-v²ÎÊýÌåÏÖÏÔʾÏêϸÊä³ö£¬-z²ÎÊýÌåÏÖʹÓÃѹËõ´«ÊäÊý¾Ý£¬–delete²ÎÊýÌåÏÖɾ³ýÄ¿µÄ·¾¶ÖÐԴ·¾¶²»±£´æµÄÎļþ¡£
scpÏÂÁî
scpÊÇSecure CopyµÄ¼ò³Æ£¬ÊÇÒ»ÖÖÔÚÍâµØºÍÔ¶³ÌÖ®¼äÇå¾²¸´ÖÆÎļþµÄ¹¤¾ß¡£Ê¹ÓÃscpÏÂÁî¿ÉÒÔÀû±ãµØ½«Îļþ´Óһ̨Ö÷»ú¸´ÖƵ½Áíһ̨Ö÷»ú¡£ÏÂÃæÊÇʹÓÃscpÏÂÁîʵÏÖÊý¾Ýͬ²½µÄʾÀý´úÂ룺
scp -r /source/path/ user@remote:/destination/path/
µÇ¼ºó¸´ÖÆ
ÉÏÊöÏÂÁîÖУ¬-r²ÎÊýÌåÏֵݹ鸴ÖÆÕû¸öĿ¼£¬°üÀ¨×ÓĿ¼ºÍÎļþ¡£
Syncthing¹¤¾ß
SyncthingÊÇÒ»ÖÖÓÃÓÚÒ»Á¬¡¢ÊµÊ±µÄÎļþͬ²½µÄ¿ªÔ´¹¤¾ß¡£Ëü¾ßÓÐÈ¥ÖÐÑ뻯µÄÌص㣬ÎÞÐèЧÀÍÆ÷À´´æ´¢Êý¾Ý¡£ÏÂÃæÊÇʹÓÃSyncthingÉèÖÃÊý¾Ýͬ²½µÄʾÀý´úÂ룺
Ê×ÏÈ£¬×°ÖÃSyncthing£º
sudo apt-get install syncthing
µÇ¼ºó¸´ÖÆ
È»ºó£¬Æô¶¯SyncthingЧÀÍ£º
syncthing
µÇ¼ºó¸´ÖÆ
½ÓÏÂÀ´£¬ÔÚä¯ÀÀÆ÷ÖÐÊäÈëhttp://localhost:8384£¬·¿ªSyncthingµÄWeb½çÃæ¡£ÔÚWeb½çÃæÖУ¬ÉèÖÃÄúµÄ×°±¸£¬²¢½¨Éèͬ²½Ä¿Â¼¡£
×îºó£¬ÔÚÐèҪͬ²½µÄ×°±¸ÉÏ×°Öò¢ÉèÖÃSyncthing£¬²¢½«Í¬²½Ä¿Â¼Ìí¼Óµ½×°±¸µÄͬ²½ÁбíÖС£
Rclone¹¤¾ß
RcloneÊÇÒ»¿îÓÃÓÚÔÚ²î±ð´æ´¢ºó¶ËÖ®¼äͬ²½Êý¾ÝµÄÏÂÁîÐй¤¾ß¡£ËüÖ§³Ö¶àÖÖ´æ´¢ºó¶Ë£¬°üÀ¨ÍâµØÎļþϵͳ¡¢Ôƴ洢ЧÀͺÍÆäËûµÚÈý·½´æ´¢Ð§ÀÍ¡£ÏÂÃæÊÇʹÓÃRcloneÉèÖÃÊý¾Ýͬ²½µÄʾÀý´úÂ룺
Ê×ÏÈ£¬×°ÖÃRclone£º
sudo apt-get install rclone
µÇ¼ºó¸´ÖÆ
È»ºó£¬ÔËÐÐÒÔÏÂÏÂÁîÉèÖÃRclone£º
rclone config
µÇ¼ºó¸´ÖÆ
ƾ֤ÌáÐÑ£¬Ñ¡ÔñÌí¼ÓÒ»¸öеÄÔ¶³Ì´æ´¢£¬ÊäÈë´æ´¢µÄÃû³ÆºÍÀàÐÍ£¬È»ºóƾ֤ÌáÐÑÊäÈëÏà¹ØµÄÉèÖÃÐÅÏ¢£¬ÀýÈç»á¼ûÃÜÔ¿¡¢Í°Ãû³ÆµÈ¡£
×îºó£¬Ê¹ÓÃÒÔÏÂÏÂÁîͬ²½Êý¾Ý£º
rclone sync /source/path/ remote:/destination/path/
µÇ¼ºó¸´ÖÆ
ÉÏÊöÏÂÁîÖУ¬/source/path/ÊÇԴ·¾¶£¬remote:/destination/path/ÊÇÄ¿µÄ·¾¶¡£
×ܽ᣺
±¾ÎÄÏÈÈÝÁËÔÚLinuxÉÏÉèÖÃÊý¾Ýͬ²½µÄ¼¸ÖÖ³£¼ûÒªÁ죬²¢ÌṩÁËÏìÓ¦µÄ´úÂëʾÀý¡£ÎÞÂÛÊÇʹÓÃrsyncÏÂÁî¡¢scpÏÂÁî¡¢Syncthing¹¤¾ßÕÕ¾ÉRclone¹¤¾ß£¬¶¼¿ÉÒÔʵÏÖÊý¾ÝÔÚ²î±ð×°±¸Ö®¼äµÄͬ²½ºÍ±¸·Ý¡£¶ÁÕß¿ÉÒÔƾ֤×Ô¼ºµÄÐèÇóÑ¡ÔñÊʺϵÄÒªÁ죬²¢Æ¾Ö¤Ê¾Àý´úÂë¾ÙÐÐÉèÖá£Í¨¹ýºÏÀíÉèÖÃÊý¾Ýͬ²½£¬¿ÉÒÔÈ·±£Êý¾ÝµÄÇå¾²ÐԺͿɿ¿ÐÔ£¬Ìá¸ßÊÂÇéºÍÉúÑÄЧÂÊ¡£
ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖÃÊý¾Ýͬ²½µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡