انجمن‌های فارسی اوبونتو

لطفاً به انجمن‌ها وارد شده و یا جهت ورود ثبت‌نام نمائید

لطفاً جهت ورود نام کاربری و رمز عبورتان را وارد نمائید




نویسنده موضوع: نیاز به راهنمایی جهت کار با csync2  (دفعات بازدید: 1544 بار)

0 کاربر و 1 مهمان درحال مشاهده موضوع.

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
نیاز به راهنمایی جهت کار با csync2
« : 23 امرداد 1394، 11:22 ب‌ظ »
میخوام دوتا پوشه رو که رو دوتا سرور مختلف هستند با csync با هم سینک کنم. از این آموزش‌ها هم استفاده کردم:
http://linuxaria.com/howto/csync2-a-filesystem-syncronization-tool-for-linux
http://www.woitasen.com.ar/2011/09/synchronizing-files-with-csync2/

یه نگاه کوچیکی هم به این پی دی اف انداختم:
http://oss.linbit.com/csync2/paper.pdf

ولی آخرش همش پیغام خطای Identification failed میگیرم یا پیغام‌های مشابه که میگه سرور دوم رو نمیتونه تایید کنه.  ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)

اگه یه آموزش خلاصه و جدید بجز این‌ها سراغ دارید باز هم خوبه...
« آخرین ویرایش: 24 امرداد 1394، 12:42 ب‌ظ توسط حامد سپهر »

آفلاین alih_net

  • High Sr. Member
  • *
  • ارسال: 596
  • جنسیت : پسر
    • سیدعلی حسینی
پاسخ : نیاز به راهنمایی جهت کار با csync
« پاسخ #1 : 24 امرداد 1394، 01:33 ق‌ظ »
دقیقاچه‌دستوری‌میزنی؟
به‌طورخلاصه:
csync /home/csync sftp://csync@krikkit.galaxy.site:2222/home/csync

آفلاین دانیال بهزادی

  • ناظر انجمن
  • *
  • ارسال: 19687
  • جنسیت : پسر
  • Urahara Kiesuke
    • وبلاگ
پاسخ : نیاز به راهنمایی جهت کار با csync
« پاسخ #2 : 24 امرداد 1394، 02:07 ق‌ظ »
معمولاً برای این کارها از rsync استفاده می‌شه. من csync رو ندیدم، ولی با rsync هیچ‌وقت مشکلی نداشتم.
اگه این ارسال بهت کمک کرد، دنبال دکمهٔ تشکر نگرد. به جاش تو هم به جامعهٔ آزادت کمک کن

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
پاسخ : نیاز به راهنمایی جهت کار با csync
« پاسخ #3 : 24 امرداد 1394، 12:24 ب‌ظ »
معمولاً برای این کارها از rsync استفاده می‌شه. من csync رو ندیدم، ولی با rsync هیچ‌وقت مشکلی نداشتم.

لینک اول پست اول

Why you don’t just use rsync ?

This could be a common question, rsync is a good tool and i think that every linux administrator sooner or later has used it, and so you could think that this is enough to handle the sync between filesystems.

So let’s say that you have just 3 servers that must have the filesystem /www/ in sync between them, the webserver of each of these 3 nodes can write there and so you don’t have a master server.

You could run a rsync cron job on every server that syncs the local content with the other 2 nodes, but there are some problems in this setup this create quite some traffic, and will keep the nodes rather busy as well. After all, rsync checks if every file exists on the node, compares the contents, size or last modification date and builds a list of files to be transferred based on that. And every time it needs to connect to each nodes. This is fine for occasional updates, less fine for more regular ones, or if you have a large number of files.

Csync2 keeps a little database (sqlite as default) which contains the state of each file. This means that whenever it gets invoked, it first updates the database – and only starts to connect to the nodes in case any files were added, modified or deleted. A massive win in the number of connections it needs to make to the nodes, as most of the time there won’t be any new files. And It’s also a lot faster in checking than a Rsync.

Naturally the more nodes you have the more gains you’ll have in using csync2.


آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
پاسخ : نیاز به راهنمایی جهت کار با csync
« پاسخ #4 : 24 امرداد 1394، 12:43 ب‌ظ »
پست اول لینک پی دی اف رو اشتباه گذاشته بودم که درستش کردم.


دقیقاچه‌دستوری‌میزنی؟
به‌طورخلاصه:
csync /home/csync sftp://csync@krikkit.galaxy.site:2222/home/csync


عنوان رو تصحیح کردم، من دارم از csync2 استفاده میکنم. این ساختار روش جواب نمیده. شما لینک اول پست اول رو ببین توش مراحل کاری که کردم مشخص هست.

آفلاین alih_net

  • High Sr. Member
  • *
  • ارسال: 596
  • جنسیت : پسر
    • سیدعلی حسینی
پاسخ : نیاز به راهنمایی جهت کار با csync2
« پاسخ #5 : 24 امرداد 1394، 03:28 ب‌ظ »
scp و rsync رو پیشنهاد میدم.

آفلاین حامد سپهر

  • High Hero Member
  • *
  • ارسال: 1556
  • جنسیت : پسر
پاسخ : نیاز به راهنمایی جهت کار با csync2
« پاسخ #6 : 24 امرداد 1394، 05:21 ب‌ظ »
به شکلی کاملا عجیب با دستکاری hostname های دوتا سرور مشکل حل شد!!!

scp و rsync رو پیشنهاد میدم.

برای کاری که من لازم دارم انجام بدم جفتشون بدردنخور هستن  ;D