View: mysql dump with delete more then 3 backups

  1. 1 year ago by sx
    1. DATUM=`date '+%Y-%m-%d'`
    2. mysqldump -u USER --password=PASSWORD DATABASE TABLE > /home/backup/db.sql
    3. gzip /home/backup/db.sql
    4. mv /home/backup/db.sql.gz /home/backup/db-${DATUM}.sql.gz
    5. find /home/backup/ -mtime +2 -type f -print0 | xargs -0 rm
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1069"></script>

0 comment about "mysql dump with delete more then 3 backups"