Scenario: I wanted to backup all the databases individually from a MySQL server and keep for x days. I set about achieving this using a custom script combined with logrotate. The server is running FreeBSD 8.x. 1) Firstly, the script (backup-all-dbs.sh): #!/usr/local/bin/bash # backup-all-dbs.sh # backup each mysql db into a different file, rather Read More…