Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] sincronizzare documenti su 2 pc
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 1:33 pm    Post subject: [solved] sincronizzare documenti su 2 pc Reply with quote

Avrei bisogno di sincronizzare alcuni file contenuti in due pc (un fisso e un portatile, entrambi con gentoo 2005.1), in pratica quando torno a casa col portatile vorrei poter aggiornare i file contenuti sul fisso con quelli modificati nella giornata sul portatile.

I due pc si collegano a una rete casalinga con ip assegnato da dhcp dell'hug di fastweb, anche se ho notato che mi viene assegnato sempre lo stesso ip, quindi possiamo considerarli fissi.

Ora vorrei capire prima di tutto che programma usare per passare, anche manualmente, i file da un pc all'altro (samba?) e poi se esiste qualcosa (script, programmi, boh?) per sincronizzare i file.

Mi hanno parlato di rsync ma lo vedo un po' incasinato e non ho ancora trovato una buona guida...

Grazie


Last edited by triki on Wed Dec 28, 2005 10:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ic3M4n
Advocate
Advocate


Joined: 02 Nov 2004
Posts: 3489
Location: Bergamo.

PostPosted: Wed Dec 28, 2005 1:48 pm    Post subject: Reply with quote

rsync è il migliore IMHO. esegui un aggiornamento con trasferimento dei file più recenti dell'originale e backup di quelli più vecchi. uno dei due pc lo puoi utilizzare come server, oppure eseguire rsync come programma isolato, senza server ne client. in tal caso però devi abilitare anche ssh(credo).
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 2:00 pm    Post subject: Reply with quote

cioè nella versione "server-client" nel server devo avviare un demone rsync? e posso dal client aggiornare i file sul server o posso solo aggiornare i file sul client guardando quelli del server?
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 2:05 pm    Post subject: Reply with quote

triki wrote:
cioè nella versione "server-client" nel server devo avviare un demone rsync? e posso dal client aggiornare i file sul server o posso solo aggiornare i file sul client guardando quelli del server?

banalmente...
Code:
/etc/init.d/rsyncd start

per la configurazione del server la documentazione allegata alla distribuzione è ottima, oppure guarda sul sito del produttore.

secondo me, comunque, non è una soluzione ottima, quella di usare il server rsync. piuttosto fallo a mano, no?
Back to top
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Wed Dec 28, 2005 2:07 pm    Post subject: Reply with quote

k.gothmog wrote:

secondo me, comunque, non è una soluzione ottima, quella di usare il server rsync. piuttosto fallo a mano, no?


perchè fare le cose a mano quando le puoi automatizzare? :twisted:
Back to top
View user's profile Send private message
MonsterMord
Guru
Guru


Joined: 28 Apr 2004
Posts: 395
Location: Italy --> Forli'

PostPosted: Wed Dec 28, 2005 2:09 pm    Post subject: Reply with quote

Se rsync non ti basta c'e' questo ottimo software:
UNISON
http://www.cis.upenn.edu/~bcpierce/unison/
_________________
Gentoo GNU/Linux on DELL Inspiron 8500
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 2:11 pm    Post subject: Reply with quote

Tiro wrote:
k.gothmog wrote:

secondo me, comunque, non è una soluzione ottima, quella di usare il server rsync. piuttosto fallo a mano, no?

perchè fare le cose a mano quando le puoi automatizzare? :twisted:

perché (a meno che non mi sbagli) anche usando il server non automatizzi nulla. semplicemente passi per il protocollo rsync (TCP/783) anziché SSH (TCP/22), ma la sincronizzazione la devi comunque dare a mano.
però ripeto... magari sto dicendo una cazzata...
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 2:22 pm    Post subject: Reply with quote

allora non sto capendo la differenza fra standalone e server-client, se non sbaglio in entrambi i casi ho un pc che chiede dei file ad un altro, quindi quello al quale vengono chiesti i file deve essere in ascolto e quindi come ha bisogno di un demone.
Dove ho sbagliato? :D
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 2:36 pm    Post subject: Reply with quote

se non usi il server, rsync si appoggia a SSH. il minimo indispensabile per poter usare rsync è infatti un server SSH attivo
Back to top
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Wed Dec 28, 2005 2:44 pm    Post subject: Reply with quote

ah..ok si in effetti per automatizzare _completamente_ tutto credo sia necessario uno scriptino o l'intervento di cron...sorry avevo inteso a mano senza nel vero senso della parola... :oops:
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 2:56 pm    Post subject: Re: sincronizzare documenti su 2 pc Reply with quote

non ci si potrebbe inventare una configurazione per fare questo con SMB?
in linea di principio è quello che succede quando si fa il login su un dominio
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 3:53 pm    Post subject: Reply with quote

k.gothmog wrote:
se non usi il server, rsync si appoggia a SSH. il minimo indispensabile per poter usare rsync è infatti un server SSH attivo


vediamo se ho capito: senza demone ssh mi farebbe da server, in pratica quello che sta in ascolto
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Wed Dec 28, 2005 3:55 pm    Post subject: Reply with quote

Moved from Forum italiano (Italian) to Forum di discussione italiano.
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 4:00 pm    Post subject: Reply with quote

[quote="triki"vediamo se ho capito: senza demone ssh mi farebbe da server, in pratica quello che sta in ascolto[/quote]
allora:

hai rsyncd attivo?
si: usi il protocollo rsync:// sulla porta 873/TCP
no: usi il protocollo SSH sulla porta 22/TCP

hai SSHd attivo?
si: vedi sopra
no: ti attacchi :D e non puoi sincronizzare niente a meno che tu non abbia rsyncd attivo

si tratta semplicemente di due diversi trasporti per lo stesso protocollo
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 4:14 pm    Post subject: Reply with quote

k praticamente uso due demoni diversi per fare la stessa cosa, a questo punto in base a cosa scelgo l'uno o l'altro? Sicurezza? Praticità?

Già che ci sono, siccome voglio poter sincronizzare in due sensi cioè:

1) aggiornare il fisso in base alle modifiche fatte sul portatile
2) aggiornare il portatile in base alle modifiche fatte sul fisso

devo mettere il demone su entrambi? o rsync mi permette sia di scrivere sul remoto che sul locale?
E nel caso ci siano su entrambi i pc modifiche sui file posso fare un rsync incrociato o prima aggiorno uno e poi aggiorno l'altro?
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 5:41 pm    Post subject: Reply with quote

come ti dicevo si tratta di scegliere tra due livelli di sessione diversi per lo stesso protocollo.
personalmente uso sempre SSH.

secondo me per quello che devi fare tu ssh è più che sufficiente.
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 6:47 pm    Post subject: Reply with quote

quindi attivo il demone SSHd e uso rsync standalone
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 7:14 pm    Post subject: Reply with quote

triki wrote:
quindi attivo il demone SSHd e uso rsync standalone

io faccio così, e va più che bene per le mie (e le tue) esigenze
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Wed Dec 28, 2005 7:57 pm    Post subject: Reply with quote

Anche a me pare migliore la strada ssh, il server rsync mi pare più adatto per sincronizzazioni via internet (tipo per l'albero del portage).
_________________
Running Fast!
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Wed Dec 28, 2005 10:20 pm    Post subject: Reply with quote

k problema risolto con tanto di scriptino bash perchè sono pigro :P
se lo ritenete utile posso postare cosa ho fatto.
Back to top
View user's profile Send private message
.:chrome:.
Advocate
Advocate


Joined: 19 Feb 2005
Posts: 4588
Location: Brescia, Italy

PostPosted: Wed Dec 28, 2005 10:37 pm    Post subject: Reply with quote

triki wrote:
se lo ritenete utile posso postare cosa ho fatto.

posta pure, ma mi sa tanto che è la stessa cosa che usiamo tutti: non c'è molta scelta tra le opzioni :D
Code:
rsync -av --delete utente@sorgente:directory utente@destinazione:directory
Back to top
View user's profile Send private message
triki
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2005
Posts: 133
Location: Zena Italy

PostPosted: Thu Dec 29, 2005 9:45 am    Post subject: Reply with quote

precisamente :D
Back to top
View user's profile Send private message
duffimc
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2005
Posts: 146
Location: Napoli, Italy

PostPosted: Mon Jul 17, 2006 8:46 am    Post subject: Reply with quote

Salve a tutti...
sto cercando per la prima volta di sincronizzare 2 cartelle su due pc diversi...
Ho provato ad eseguire questo comando

Code:
rsync -av --delete /directory ip_destinazione:directory


ma come risposta ho:
Code:
ssh: connect to host 192.168.0.3 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(465) [sender=2.6.8]


Credo che ci sia bisogno di una qualche configurazione...ma non ho ideaa di dove andare a mettere le mani.... :roll:
Dove devo andare ad agire???
Grazie a tutti raga.... :)
duffimc
_________________
www.no1984.org (No al Trusted Computing)
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Mon Jul 17, 2006 9:06 am    Post subject: Reply with quote

sembra che tu nn abbia attivato (configurato?) il demone ssh. Controlla di avere installato openssh e prova a dare
Code:
# /etc/init.d/sshd start


sul pc a cui ti connetti
_________________
Linux Registered User n. 373835

Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum
Back to top
View user's profile Send private message
duffimc
Tux's lil' helper
Tux's lil' helper


Joined: 04 Nov 2005
Posts: 146
Location: Napoli, Italy

PostPosted: Mon Jul 17, 2006 9:25 am    Post subject: Reply with quote

Onip wrote:
sembra che tu nn abbia attivato (configurato?) il demone ssh. Controlla di avere installato openssh e prova a dare
Code:
# /etc/init.d/sshd start


sul pc a cui ti connetti


...Era proprio questo... :D ...adesso tutto funziona.... :D ....
Solo una cosa, come posso fare per evitare che ogni volta mi venga chiesta la password???
Grazie ancora;)...
_________________
www.no1984.org (No al Trusted Computing)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum