-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gustavo Guillermo P�rez wrote:
> El script es este:
> mkBackup que lo adjunt� por si hay errores para copiar y pegar
> #!/bin/bash
> export FOLDERS="bin sbin boot lib etc root media tmp proc compartir dev mnt
> server srv var sys cdrom dvd floppy"
> export BIGFOLDERS="usr opt home"
> export DEST="/xtras/rw2/gnt686"
> export REALLYBIGFOLDERS="usr/local usr/src usr/share usr/X11R6 usr/loki
> opt/kde3 usr/kde"
> echo "BACKUP de los archivos RAIZ"
> find -type f -maxdepth 1 -not -name . |
> while read i
> do tar -cv "$i" | gzip -f9> "$DEST"/barra-files-`echo $i | awk -F /
> '{print $NF}'`.tgz
> done
>
> find -type l -maxdepth 1 -not -name . |
> while read i
> do tar -cv "$i" | gzip -f9> "$DEST"/barra-sym-`echo $i | awk -F /
> '{print
> $NF}'`.tgz
> done
>
> for DIR in $FOLDERS
> do
> echo "Backup de $DIR en $DEST/$DIR.tgz"
> tar -cv "$DIR" | gzip -f9 > $DEST/$DIR.tgz
> done
> for BIGDIR in $BIGFOLDERS
> do
> #Enlaces simbolicos en los directorios ralmente grandes
> find $BIGDIR -maxdepth 1 -type l |
> while read DIR
> do tar -cv $DIR | gzip -f9 > $DEST/`echo $DIR | awk -F '/' '{print
> \$1"-"\$2}'`.tgz
> done
> #Revisar las carpetas completas
> find $BIGDIR -maxdepth 1 -not -name $BIGDIR |
> while read DIR
> do
> if echo "$REALLYBIGFOLDERS" | grep "$DIR" > /dev/null;
> then
> echo "Excluded: $DIR"
> else
> echo "tar -cv $DIR | gzip -f9 > $DEST/`echo $DIR | awk -F '/' '{print
> \$1\$2}'`.tgz"
> # sleep 3
> tar -cv $DIR | gzip -f9 > $DEST/`echo $DIR | awk -F '/' '{print
> \$1"-"\$2}'`.tgz
> fi
> done
> #tar -cv $DIR | gzip -f9
> done
>
> for BIGDIR in $REALLYBIGFOLDERS
> do
> find $BIGDIR -maxdepth 1 |
> while read DIR
> do
> if echo "$REALLYBIGFOLDERS" | grep "$DIR" > /dev/null;
> then
> echo "Excluded: $DIR"
> else
> echo "tar -cv $DIR | gzip -f9 > $DEST/`echo $DIR | awk -F '/' '{print
> \$1\$2\$3}'`.tgz"
> # sleep 3
> tar -cv "$DIR" | gzip -f9 > $DEST/`echo $DIR | awk -F '/' '{print
> \$1"-"\$2"-"\$3}'`.tgz
> fi
> done
> done
>
gustavo:
con ese script, "backapeas" todo lo necesario para despues "clonar".??
mucho no se de programacion y bash tan profundo, pero me interesaria
saber lo que se puede hacer, ya que seria muy util en un aula donde
"tocan" muchas cosas y con esto se volveria al estado anterior ;)
gracias..
- --
Marco Antonio de Hoyos
15-5-157-2322 // 4268-1557
Claypole - Pcia.de Bs. As.- Argentina
ICQ#92702911 / jabber: [EMAIL PROTECTED]
===========================================
= http://tecnicoslinux.com.ar =
= https://e.ututo.org.ar =
Docente del INCASOL / www.incasol.org.ar
Instituto de Capacitacion en Software Libre
===========================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCc5aT8IcUel0XftYRAkliAKCuL0l8sk7Y2rJSzd2giTkhoNf4ewCg5NMu
CvtfMJVtjCRwMfa0qplG1Rk=
=vcee
-----END PGP SIGNATURE-----
--
Para desuscribirte ten�s que visitar la p�gina
https://listas.linux.org.ar/mailman/listinfo/lugar-gral/
/* Publica y encontra trabajo relacionado con softlibre en
http://www.linux.org.ar/modules/jobs/ */
Si ten�s alg�n inconveniente o consulta escrib� a mailto:[EMAIL PROTECTED]