php 备份数据库

<?php
$shell = "mysqldump -uroot -pyour_password database_name > "."/tmp/".date('Ymd').".sql";
exec($shell);

 crontab -e 

* * * * * /usr/local/php/bin/php  index.php

posted @ 2020-12-23 00:55  X__cicada  阅读(71)  评论(0编辑  收藏  举报