Posts Tagged: compression

Bash backup script

Posted by & filed under Linux, Server.

Here’s a script for backing up directories and databases. All files are compresses, and files older than 30 days are removed. # # Backup script # # Make compressed backups of directories/files, and old backups # Format: YEAR MONTH DAY – HOUR MINUTE SECOND DATE=$(date +%Y%m%d-%H%M%S) # backup directories and files tar -czf “/backup/target_file-$DATE.tar.gz” /home/username/public_html/home/… Read more »