Respaldos multinivel robustos y simples utilizando rsync

Submitted by gwolf on Sun, 02/10/2008 - 13:05
Written in...: 
2005

Are you looking for an easy to implement backup solution that allows you to have incremental backups, with low resources consumption, and allowing for immediate retrieval of your data? Rsync and the basic characteristics of any Unix filesystem can be your greatest allies. I prepared this talk for the Admin-UNAM December 2005 seminary, organized by the Computer Security Department, DGSCA, UNAM.

Resumen: 

¿Buscas una solución de respaldos simple de implementar, con bajo uso de recursos, que te permita tener respaldos incrementales disponibles de inmediato? Rsync y las características del sistema de archivos de cualquier Unix pueden ser tu principal aliado - Preparé esta plática para el seminario Admin-UNAM de diciembre del 2005, organizado por el Departamento de Seguridad en Cómputo, DGSCA, UNAM.

AttachmentSize
Respaldos con rsync — Presentación en PDF624.11 KB
Respaldos con rsync — Fuente en LaTeX Beamer146.86 KB
Roman's picture

Ayuda con rsync

Hola, trato de hacer respaldos con rsync pero tengo la siguiente duda:

Trato de hacer respaldos de un directorio con rsync, pero hay algunos subdirectorios que no quiero incluir, ejemplo, tengo el directorio Final con los subdirectorios Otra y Test y trato de mandarlo a otro equipo en la red sin estos subdirectorios... Si mando rsync -e ssh -artpgvb --exclude=Otra --exclude=Test ./ rfuentes@192.168.8.6:/tmp/back me manda a /tmp/back lo que yo quiero (excluye Otra y Test) pero si hago rsync -e ssh -artpgvb --exclude-from=myfilter.txt ./ rfuentes@192.168.8.6:/tmp/back no lo hace... mi archivo llamado myfilter contiene:

#este sera el archivo de exclusiones
- Otra/
- Test/

cabe decir que estoy ejecutando el comando en el directorio que estoy copiando, y que el archivo myfilter.txt se encuentra en la misma ruta.

gwolf's picture

Busca un caso base

Creo que tu problema son los guiones, si es que los estás incluyendo... Mira, como caso base te sugiero usar rsync para copia local:

  1. 0 gwolf@malenkaya『24/tmp/1$ mkdir src
  2. 0 gwolf@malenkaya『25/tmp/1$ mkdir dst
  3. 0 gwolf@malenkaya『26/tmp/1$ echo 1 > src/test1
  4. 0 gwolf@malenkaya『27/tmp/1$ echo 1 > src/test2
  5. 0 gwolf@malenkaya『28/tmp/1$ echo 1 > src/test3
  6. 0 gwolf@malenkaya『29/tmp/1$ echo test1 > excl
  7. 0 gwolf@malenkaya『30/tmp/1$ rsync --exclude-from=excl src/* dst/
  8. 0 gwolf@malenkaya『31/tmp/1$ ls dst/
  9. test2 test3

Esto es, test1 (que está incluida en excl) fue ignorada exitosamente.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <br> <b> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <img> <h1> <h2> <h3> <tt> <pre> <strike> <table> <tr> <th> <td>
  • Lines and paragraphs break automatically.
  • Use <bib>citekey</bib> or [bib]citekey[/bib] to insert automatically numbered references.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Keep in mind that all comments will also have to be administrator-moderated. Don't waste your time writing a spam that no one will read.
Image CAPTCHA
Enter the characters shown in the image.