phds2010
(usa CentOS)
Enviado em 01/12/2016 - 09:20h
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
30 22 * * * root /var/local/agent/bkp-agent >/dev/null 2>&1
01 00 * * * root /var/local/lmpTrocaArquivos/lmpTrocaArquivos >/dev/null 2>&1
01 00 * * * root /var/local/rotina_backups/rotina_backups
00-59/5 * * * * root /var/local/scripts/memfree.sh
#!/bin/bash
# ----------------------------------------------------------------------------
# ROTINA DE BACKUPS
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
#
DHOME=/var/local/rotina_backups
# APAGANDO TODOS OS ARQUIVOS
rm -rf /home/localhost/BACKUPS/SETORES/*
rm -rf /home/localhost/BACKUPS/USUARIOS/*
# ----------------------------------------------------------------------------
cd $DHOME
# - INCLUDES DE ARQUIVOS
# - Departamentos Padroes
. bkp_comercial.conf
. bkp_diretoria.conf
. bkp_financeiro.conf
. bkp_almoxarifado.conf
. bkp_prod.conf
. bkp_rh.conf
. bkp_qualidade.conf
. bkp_ti.conf
. bkp_varejo.conf
. bkp_projetos.conf
# - Outros diretorios ( Interacoes entre departamentos )
. bkp_qualidade-varejo.conf
. bkp_iops.conf
. bkp_doc.conf
. bkp_planilha.conf
. bkp_usuarios.conf
. bkp_projetos-rh-prod.conf
. bkp_almoxarifado-monitoramento.conf
. bkp_projetos-prod-financeiro-logistica-comercial.conf