Database backup
the script v0.3
the script v0.4
the script v0.5
the script v0.6
If you are using version 0.6 you will need to download an external script. This script will backup all ownerships and permissions of all the files on the system.
Allright.pl homepage
# crontab -l (only logging)
@daily /root/backup/create_dump.sh &> /root/backup/logs/`date +\\%d`.dump.log
# crontab -l (logging + mail)
@daily /root/backup/create_dump.sh &> /root/backup/logs/`date +\\%d`.dump.log; cat /root/backup/logs/`date +\\%d`.dump.log | mail -s "db_dump on `uname -n`" name@domain.com
# tree /root/backup/
/root/backup
|-- allrights.pl
|-- create_dump.sh
|-- db_dump
| |-- 01.partition
| |-- 01.pgdump.gz
| |-- 01.ldif.gz
| |-- 01.mysql.tar.gz
| |-- 01.rpmqa
| `-- ...
`-- logs
|-- 01.dump.log
|-- 02.dump.log
|-- 03.dump.log
`-- ...