[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync



> Sto cercando di implementare un sistema di backup fra due linux box
> tramite rsync.
> In locale va tutto bene.
> Non riesco invece a far funzionare in remoto la connessione fra i due
> pc.
> Ho configurato il file rsyncd.conf come da istruzioni (path=/dirdiprova/
> read only = yes uid = root gid = root host allow = 192.168.1.1) ma
> niente.
> Quando tento la connessione nella migliore delle ipotesi mi rimane in
> sospeso per un lungo periodo sino a quando non mi dice che il tentativo
> di connessione non è andato a buon fine o che il tempo è scaduto.
> 
> Avete mai provato?
> Qualche suggerimento?

Ciao,

io uso rsync per sincronizzare due directory su due linuxbox diverse
(una debian ed una redhat), devi usarlo in combinazione con ssh.

Ti allego, spero sia permesso in lista, questo mini howto che avevo
trovato in rete.

Ciao.

-- 
Gianni Olivieri       |      
gianni@cln.it         |     Debian GNU/Linux
http://gianni.cln.it  |     Sys Admin . Programmer . Web design   
               
Dalla mia testa come uva matura
gocciola il folle vino delle chiome
voglio essere una gialla velatura
gonfia verso un paese senza nome
[A. Branduardi]

- firma generata casualmente -


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
<title>backups using rsync+ssh howto</title>

<meta name="webmaster" content="gabrielfm@yahoo.com" />
<meta name="email" content="gabrielfm@yahoo.com" />
<meta name="keywords" content="gabriel, gabriel martinez, garage, punk,
computers, Linux, OpenBSD, BSD, vi" />
<meta name="description" content="Personal home page for Gabriel Martinez" />
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />

<style type="text/css">
<!--
body { margin: 20px; }
// -->
</style>
</head>

<body bgcolor="#828282" text="#000000">


<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="100%">
<tr>
<td>
<table border="0" cellpadding="5" cellspacing="1" width="100%">
<tr><td align="center" bgcolor="#EEEAEE"><font color="#404040"><b>backups using rsync+ssh how-to simplified</b></font></td></tr>
<tr><td bgcolor="#ffffff" valign="top">a quick how to on rsync over ssh all automated using ssh keys. got all of this info over the net, but this is simplified might be of use to someone? not really linux specific, either.  
<br />
<ol>
<li>make sure ssh and rsync are installed on both computers</li>
<li>ssh-keygen -t dsa as root</li>
<li>choose a location other than /root/.ssh/id_dsa (ex. /root/.ssh/remotehost.id_dsa)</li>
<li>enter a BLANK passphrase</li>
<li>write a file called <code>config</code> inside /root/.ssh/ with options like these
<pre>
 Host remotehost
 User root
 Compression yes
 Protocol 2
 RSAAuthentication yes
 StrictHostKeyChecking no
 ForwardAgent yes
 ForwardX11 yes
 IdentityFile /root/.ssh/remotehost.id_dsa

</pre></li>
<li>copy the /root/.ssh/remotehost.id_dsa.pub file and paste the file in or at the end of the remotehost's /root/.ssh/authorized_keys2 file</li>
<li>test if you can login using ssh remotehost ; if you can't login, add the -v flag and check permissions for /root/.ssh on both computers (should be chmod 700 with the files inside the directory 600). Also, check the sshd_config file to see if root is permitted to login.</li>
<li>now you can rsync a local directory onto the remotehost! here's an example:<code> /usr/bin/rsync -e ssh -avzp --exclude "*.journal" --exclude "dnscache/" --exclude "dnscachex/" --delete /home remotehost:/var/backups/mycomputer/</code> which will archive and mirror /home onto the remotehost's /var/backups/mycomputer directory and keep all the permissions. Slashes matter, this works for me though. Note that *.journal are the journal files on ext3 partitions and don't need to be copied and the --delete flag can be omitted in case you want to keep old file that have been deleted archived on the remotehost side permenently.</li>
<li>place the above command inside a shell script and place in /etc/cron.daily</li>
</ol>
<br />

</td></tr>
</table>
</td>
</tr>
</table>

<br />

<i>Last modified: Monday, 04-Nov-2002 12:37:14 CST </i><br />

</body>
</html>

Reply to: