Diferencia entre revisiones de «Rsync»

De gacq wiki
Saltar a: navegación, buscar
Línea 1: Línea 1:
== Duplicando una maquina con rsync ==
+
=My notebook syncronization=
 +
==gacq.com-get==
 +
<pre><nowiki>
 +
#!/bin/bash
 +
 
 +
RUN=`lps x | grep rsync | grep -v grep | wc -l`
 +
if [ "$RUN" -gt 0 ]; then
 +
echo already running
 +
exit 1
 +
fi
 +
 
 +
echo Recibiendo.....
 +
rsync -avuze 'ssh -p 22022' --delete gacq@gacq.com:/srv/gacq/rsync/ rsync
 +
 
 +
exit 0
 +
</nowiki></pre>
 +
 
 +
==gacq.com-put==
 +
<pre><nowiki>
 +
#!/bin/bash
 +
 
 +
RUN=`lps x | grep rsync | grep -v grep | wc -l`
 +
if [ "$RUN" -gt 0 ]; then
 +
echo already running
 +
exit 1
 +
fi
 +
 
 +
echo Enviando.....
 +
rsync -Cavuze 'ssh -p 22022' --delete rsync gacq@gacq.com:/srv/gacq/
 +
 
 +
exit 0
 +
</nowiki></pre>
 +
 
 +
 
 +
 
 +
= Duplicando una maquina con rsync =
 
<pre><nowiki>
 
<pre><nowiki>
 
rsync -v -r -p -o -g -D -t -S -l -H \
 
rsync -v -r -p -o -g -D -t -S -l -H \

Revisión del 00:48 21 sep 2006

My notebook syncronization

gacq.com-get

#!/bin/bash

RUN=`lps x | grep rsync | grep -v grep | wc -l`
if [ "$RUN" -gt 0 ]; then
 echo already running
 exit 1
fi

echo Recibiendo.....
rsync -avuze 'ssh -p 22022' --delete gacq@gacq.com:/srv/gacq/rsync/ rsync

exit 0

gacq.com-put

#!/bin/bash

RUN=`lps x | grep rsync | grep -v grep | wc -l`
if [ "$RUN" -gt 0 ]; then
 echo already running
 exit 1
fi

echo Enviando.....
rsync -Cavuze 'ssh -p 22022' --delete rsync gacq@gacq.com:/srv/gacq/

exit 0


Duplicando una maquina con rsync

rsync -v -r -p -o -g -D -t -S -l -H \
--exclude /mnt/   \
--exclude /proc/ \
--exclude /tmp/ \
--exclude /home/ / /mnt/fireball/

Boot from a CD-ROM and mount the target-disk. Fix fstab and lilo.conf. Create /mnt and /proc and set the right permissions (for this directories). Then run lilo and reboot. Next time you run rsync, add these option to the command-line:

--exclude /etc/fstab \
--exclude /etc/lilo.conf \
--delete