#!/bin/bash #tive problemas em usar o ~/, então tive que usar o pwd. PASTA_RAIZ=`pwd` ORIGEM_BKP="${PASTA_RAIZ}/public_html" DESTINO_BKP="${PASTA_RAIZ}/backups/public_html_`date +%Y-%m-%dT%H-%M-%S`.tgz" COMANDO_BKP="tar -czpf" #Mostrando no log o comando a ser usado echo "Comando a ser executado:" echo "${COMANDO_BKP} ${DESTINO_BKP} ${ORIGEM_BKP}" #Executando o comando de backup ${COMANDO_BKP} ${DESTINO_BKP} ${ORIGEM_BKP}
Um diário aleatório