Unison - Ngwá ọrụ mmekọrịta faịlụ kacha dị na mpaghara/ime ime maka Linux


Mmekọrịta faịlụ bụ usoro nke mirroring, faịlụ na data n'ebe abụọ ma ọ bụ karịa dị ka ụfọdụ protocol si dị. Faịlụ na data bụ ihe kacha baa uru n'oge teknụzụ Ozi. Site na Mmekọrịta Faịlụ, anyị na-ahụ na otu ma ọ bụ karịa nke data anyị dị oke ọnụ ahịa na-adị mgbe niile ma ọ bụrụ na ọdachi nwere ụdị ọ bụla ma ọ bụ mgbe anyị kwesịrị ịrụ ọrụ n'ọtụtụ ebe.

Ezigbo Synchronizer faịlụ kwesịrị ịnwe atụmatụ ndị edepụtara n'okpuru:

  1. Mmekọrịta Cryptographic, dị ka mmejuputa nchekwa.
  2. Mkpakọ data oke dị mma.
  3. Mmejuputa algọridim zuru oke iji lelee ntugharị data.
  4. Chekwaa mgbanwe isi iyi faịlụ.
  5. Mmekọrịta ahaziri.

Otu ngwá ọrụ dị otú ahụ bụ Unison. N'ebe a n'isiokwu a, anyị ga-atụle \Unison n'ụzọ zuru ezu, yana atụmatụ ya, ọrụ ya na ọtụtụ ndị ọzọ.

Kedu ihe bụ Unison?

Unison bụ ngwa mmekọrịta faịlụ n'elu ikpo okwu bara uru na ịmekọrịta data n'etiti ọnọdụ abụọ ma ọ bụ karịa ma ọ bụ kọmputa ma ọ bụ ngwaọrụ nchekwa.

  1. Wepụtara n'okpuru Ikikere Ọhaneze (GPL)
  2. Oghere isi iyi na Cross Platform dị maka (Linux, Unix, BSD, Windows, Mac)
  3. Mee otu ụdị faịlụ dị n'ofe igwe dị iche iche, n'agbanyeghị ebe gbanwechara ikpeazụ.
  4. Mmekọrịta Cross Platform kwere omume ya bụ, enwere ike imekọrịta igwe Windows n'elu ihe nkesa *nix.
  5. Na-ekwurịta okwu n'elu ọkọlọtọ Protocol TCP/IP ya bụ, enwere ike n'etiti igwe abụọ ọ bụla n'ime ịntanetị n'agbanyeghị ebe mpaghara ala.
  6. Smart Management – Gosi esemokwu mgbe emezigharịrị faịlụ na isi mmalite abụọ wee gosi ya onye ọrụ.
  7. njikọ SSH echekwara - mbufe data ezoro ezo.
  8. rsync algọridim ka etinyere ebe a, ọ bụ naanị akụkụ a gbanwere ka a na-ebufe ma degharịa ya. N'ihi ya. ọ na-adị ngwa ngwa na mkpochapụ na mmezi.
  9. siri ike na okike
  10. Edere ya n'asụsụ mmemme nke ebumnuche Caml.
  11. Tozuo oke ma kwụsie ike, ọ nweghị mmepe arụ ọrụ achọrọ.
  12. Ọ bụ mmemme ọkwa onye ọrụ ya bụ, Ngwa achọghị ikike nke onye ọrụ.
  13. Amara ya maka nkọwa doro anya na nke ziri ezi.

Nwụnye Unison na Linux

Enwere ike ibudata ntọhapụ kwụsiri ike ugbu a (Unison-2.40.102) site na njikọ dị n'okpuru:

Budata Unison 2.40.102 Stable

N'aka nke ọzọ, anyị nwekwara ike ibudata na Wụnye \Unison, ma ọ bụrụ na ọ dị na repo site na iji apt ma ọ bụ yum iwu dị ka egosiri n'okpuru.

Mepee ọnụ site na iji Ctr+Alt+T ma mee iwu na-esonụ na ọnụ.

$ sudo apt-get install unison

Nke mbụ, mee ka ebe nchekwa EPEL wee wụnye site na iji iwu a.

$ sudo yum install unison

IHE: Iwu dị n'elu ga-etinye Unison na-enweghị GUI. Ọ bụrụ na ịchọrọ ịwụnye Unison na nkwado GUI, wụnye ngwugwu 'unison-gtk' (naanị maka Debian based distros) site na iji iwu dị n'okpuru.

# apt-get install unison-gtk

Otu esi eji Unison

A na-eji Unison mekọrịta otu faịlụ n'ime osisi ndekọ gaa na ebe ọzọ nwere usoro yiri ya, nke nwere ike ịbụ onye ọbịa mpaghara ma ọ bụ onye ọbịa dịpụrụ adịpụ.

Ka anyị mepụta faịlụ 5 n'okpuru Desktọpụ gị wee mekọrịta ya na folda akpọrọ 'desk-back' na ndekọ ụlọ gị.

$ cd Desktop/
$ touch 1.txt 2.txt 3.txt 4.txt 5.txt
$ ls

1.txt 2.txt 3.txt 4.txt 5.txt
$ mkdir /home/server/desk-back

Ugbu a gbanye iwu 'unison' ka ịmekọrịta faịlụ Desktọpụ gị n'okpuru 'desk-back' na ndekọ ụlọ gị.

$ unison /home/server/Desktop /home/server/desk-back/
Contacting server...
Looking for changes
Warning: No archive files were found for these roots, whose canonical names are:
/home/server/Desktop
/home/server/desk-back
This can happen either
because this is the first time you have synchronized these roots,
or because you have upgraded Unison to a new version with a different
archive format.
Update detection may take a while on this run if the replicas are
large.
Unison will assume that the 'last synchronized state' of both replicas
was completely empty. This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations. See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.
Donations to the Unison project are gratefully accepted:
http://www.cis.upenn.edu/~bcpierce/unison
Press return to continue.[]
...
...
Saving synchronizer state
Synchronization complete at 13:52:15 (5 items transferred, 0 skipped, 0 failed)

Ugbu a lelee ọnọdụ/ụlọ/ihe nkesa/desk-back, ma ọ bụrụ na usoro mmekọrịta ahụ gara nke ọma?

$ cd /home/server/desk-back/
$ ls

1.txt 2.txt 3.txt 4.txt 5.txt

Maka mmekọrịta faịlụ dịpụrụ adịpụ, ị ga-enwerịrị otu ụdị Unison arụnyere na ma mpaghara yana sava dịpụrụ adịpụ. Gbaa iwu na-esonụ iji nyochaa na otu mpaghara nwere ike ịmalite na jikọọ na sava unit dịpụrụ adịpụ.

$ unison -testServer /home/ravisaive/Desktop/ ssh://172.16.25.125//home/ravisaive/Desktop/
Contacting server...
[email 's password: 
Connected [//tecmint//home/ravisaive/Desktop -> //tecmint//home/ravisaive/Desktop]

Nsonaazụ dị n'elu, na-egosi na ejikọrọ ihe nkesa dịpụrụ adịpụ nke ọma, mekọrịta faịlụ ndị ahụ site na iji iwu dị n'okpuru.

$ unison -batch /home/ravisaive/Desktop/ ssh://172.16.25.125//home/ravisaive/Desktop/

Nzọụkwụ mbụ bụ ịtọ profaịlụ nke chọrọ ka ịtọọ ozi bụ isi dị ka aha profaịlụ yana ihe ịchọrọ ịmekọrịta, isi mmalite na ebe ebe, wdg.

Iji malite Unison GUI, mee iwu na-esonụ na ọnụ.

$ unison-gtk

Ozugbo emepụtara profaịlụ wee banye na isi mmalite yana ebe ị na-aga, a na-anabata anyị na windo dị n'okpuru.

Naanị họrọ faịlụ niile wee pịa OK. Faịlụ ga-amalite ịmekọrịta site na ntụzịaka abụọ ahụ, dabere na stampụ oge mmelite ikpeazụ.

Mmechi

Unison bụ ngwá ọrụ magburu onwe ya nke na-eme ka o kwe omume inwe mmekọrịta omenala n'ụzọ ọ bụla (Bidirectional), dị na GUI yana iwu Line Utility. Unison na-enye ihe ọ na-ekwe nkwa. Ngwá ọrụ a dị nnọọ mfe iji na-achọghị mgbalị ọzọ. Dịka onye nyocha ngwa a masịrị m nke ukwuu. Ọ nwere ọtụtụ atụmatụ nke enwere ike imejuputa dị ka achọrọ. Maka ozi ndị ọzọ gụọ otu akwụkwọ ntuziaka.

  1. Rsync (mmekọrịta dịpụrụ adịpụ) nke faịlụ
  2. Rsnapshot (Dabere na Rsync) faịlụ mmekọrịta

Nke ahụ bụ ihe niile ugbu a. Aga m anọ ebe a ọzọ na akụkọ ọzọ na-atọ ụtọ. Ruo mgbe ahụ nọrọ na nche wee jikọọ na Tecment. Echefula ịnye anyị nzaghachi gị bara uru na ngalaba nkọwa anyị.