estos scripts se activan desde el archivo crontab
copidatabases.sh (mysql)
#!/bin/sh
fecha=$(date +%y-%m-%d-%H-%M)
DIRECTORIO_INICIAL=/var/lib/mysql
DIRECTORIO_FINAL=$1
mkdir $DIRECTORIO_FINAL/$fecha
for a in `ls $DIRECTORIO_INICIAL`
do
fname=`echo $a | tr A-Z a-z`
echo $DIRECTORIO_INICIAL/$a $DIRECTORIO_INICIAL/$fname
/usr/bin/mysqldump -u ADMIN --password=nickel $fname>$DIRECTORIO_FINAL/$fecha/$fname.sql
done;
exit 0
copi.sh (directorios a incluir y tar)
#!/bin/sh
DIAS=$3
DIRECTORIO_INICIAL=$1
DIRECTORIO_FINAL=$2
fecha=$(date +%y-%m-%d-%H-%M)
find $DIRECTORIO_INICIAL -mtime -$DIAS \! -type d | cat > $DIRECTORIO_FINAL$fecha.txt
tar -cv -T $DIRECTORIO_FINAL$fecha.txt -f $DIRECTORIO_FINAL$fecha.tar
Mostrando entradas con la etiqueta Configuraciones Seguridad Servidor. Mostrar todas las entradas
Mostrando entradas con la etiqueta Configuraciones Seguridad Servidor. Mostrar todas las entradas
martes, 13 de noviembre de 2007
linux script copias seguridad
Publicado por
Juan Antonio Ruz
en
3:18
1 comentarios
Categorías: Configuraciones Seguridad Servidor
miércoles, 2 de mayo de 2007
inittab iniciar servicios en arranque
http://www.hispafuentes.com/hf-doc/man/man5/inittab.5.html
Publicado por
Juan Antonio Ruz
en
7:43
0
comentarios
Categorías: Configuraciones Seguridad Servidor, linux, servidores
viernes, 30 de marzo de 2007
chgrp chown
wikipedia chgrp
chgrp -R nuevogrp directorio
wikipedia chown
chown -R nuevousr directorio
Publicado por
Juan Antonio Ruz
en
12:02
0
comentarios
Categorías: Configuraciones Seguridad Servidor, linux
Control de usuarios y contabilidad de recursos
Fichero /etc/passwd
En cada linea puedes encontrar todos estos parametros (JOÉ):
- nombre de cuenta
- contraseña cifrada,
- identificador numerico
- identificador de grupo
- informacion convencional
- directorio raiz de la cuenta
- interprete de comandos asignado
http://www.linux-party.com/TutorialLinux/linux_files/linux5.html
Publicado por
Juan Antonio Ruz
en
11:50
0
comentarios
Categorías: Configuraciones Seguridad Servidor, linux, servidores
Suscribirse a:
Entradas (Atom)