Diferencia entre revisiones de «Rsync»

De gacq wiki
Saltar a: navegación, buscar
(My notebook syncronization)
(My notebook syncronization)
Línea 2: Línea 2:
 
==gacq.com-get==
 
==gacq.com-get==
 
<pre><nowiki>
 
<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 Receiving.....
 
echo Receiving.....
rsync -avuze 'ssh -p 22' --delete anysyncuser@gacq.com:/srv/gacq/rsync/ rsync
+
rsync -avuze 'ssh -p 22' --delete anysyncuser@myserver:/srv/gacq/rsync/ rsync
 
 
exit 0
 
 
</nowiki></pre>
 
</nowiki></pre>
  
 
==gacq.com-put==
 
==gacq.com-put==
 
<pre><nowiki>
 
<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 Sending.....
 
echo Sending.....
rsync -Cavuze 'ssh -p 22' --delete rsync anysyncuser@gacq.com:/srv/gacq/
+
rsync -Cavuze 'ssh -p 22' --delete rsync anysyncuser@myserver:/srv/gacq/
 
 
exit 0
 
 
</nowiki></pre>
 
</nowiki></pre>
  

Revisión del 07:35 21 sep 2006

My notebook syncronization

gacq.com-get

echo Receiving.....
rsync -avuze 'ssh -p 22' --delete anysyncuser@myserver:/srv/gacq/rsync/ rsync

gacq.com-put

echo Sending.....
rsync -Cavuze 'ssh -p 22' --delete rsync anysyncuser@myserver:/srv/gacq/

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