bash shell file for daily database backup - Run as CRON job


/ Published in: Bash
Save to your folder(s)

Creates a daily backup and deletes any backup older than 60 days.
Replace:
*DB_USER
*DB_PASSWORD
*DB_NAME
*/path/to/backup
with your actual database name, credentials and path to where you want your backup to live.

Last note: you don't necessarily need to wrap your password in quotes. Some characters will cause it to break without them, however.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.