El S�bado, 30 de Abril de 2005 09:30, Marco Antonio de Hoyos escribi�:
> 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 ;)
>
Lo pongo en Internet y te paso la URL, este es para clonar, pero para
restaurar las configuraciones hice algo m�s simple, otro que se llama
mkRestoreconf y un script de arranque que detecta una orden especial del
kernel y deja como estaba la carpeta del usuario invitado o todos los dem�s y
la carpeta /etc completa entonces con solo una orden de arranque en 5 minutos
queta todo el desk como estaba.
Saludos.
--
Gustavo Guillermo P�rez
Compunauta uLinux
www.ulinux.tk
--
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]