-
-
Save anonymous/4a2bc30681f640ffd044 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# fecha has a formated date | |
fecha=`date +"%d-%m-%Y"` | |
# Backup and gzip the directory | |
#tar zcvf /backups/trunk-$fecha.tgz /var/www/repository | |
tar zcvf /mnt/nfs_backups/YOdesa/var-log-$fecha.tgz /var/log | |
tar zcvf /mnt/nfs_backups/YOdesa/var-www-$fecha.tgz /var/www | |
tar zcvf /mnt/nfs_backups/YOdesa/etc-$fecha.tgz /etc | |
# Rotate the logs, delete older than 7 days | |
find /mnt/nfs_backups/YOdesa/ -mtime +7 -exec rm {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment