Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Datos
- user=""
- password=""
- host=""
- db_name=""
- # Path backup
- backup_path="/xxx/xxxx/"
- # db perm
- umask 177
- # delete old backups in path
- find $backup_path/* -mtime +1 -exec rm {} \;
- # dump de la db
- mysqldump --user=$user --password=$password --host=$host $db_name > $backup_path/$db_name.sql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement